Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ncontrol argument in random_steps is ignored #118

Closed
mariusgrabow opened this issue Oct 16, 2024 · 1 comment
Closed

ncontrol argument in random_steps is ignored #118

mariusgrabow opened this issue Oct 16, 2024 · 1 comment

Comments

@mariusgrabow
Copy link

Hi Johannes,

recently, I found that the ncontrol argument in random_steps is ignored (always using 10 random steps, the default, instead of the specified number). Reproducible example below.

Best

Marius

fisher<-amt::amt_fisher%>%
make_track(x_,y_,t_,id=id)%>%
nest(data= -id)%>%
mutate(data = map(
data, ~ track_resample(.x,
rate=hours(1),
tolerance=minutes(5))))%>%
mutate(
data = map(data, ~steps_by_burst(.x,keep_cols="end")),
data = map(data, ~random_steps(.x,ncontrol=20)))%>% #completely ignored, no matter which number i use
unnest(cols = data)

sessionInfo()

R version 4.3.3 (2024-02-29 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.utf8 LC_CTYPE=English_United Kingdom.utf8 LC_MONETARY=English_United Kingdom.utf8
[4] LC_NUMERIC=C LC_TIME=English_United Kingdom.utf8

time zone: Europe/Berlin
tzcode source: internal

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] glmmTMB_1.1.9 broom_1.0.5 here_1.0.1 sf_1.0-16 amt_0.3.0.0 terra_1.7-71 lubridate_1.9.3
[8] forcats_1.0.0 stringr_1.5.1 dplyr_1.1.4 purrr_1.0.2 readr_2.1.5 tidyr_1.3.1 tibble_3.2.1
[15] ggplot2_3.5.0 tidyverse_2.0.0

loaded via a namespace (and not attached):
[1] DBI_1.2.2 Rdpack_2.6.1 remotes_2.5.0 sandwich_3.1-0 rlang_1.1.3 magrittr_2.0.3
[7] multcomp_1.4-25 furrr_0.3.1 e1071_1.7-14 compiler_4.3.3 d6atlas_0.0.0.9000 mgcv_1.9-1
[13] vctrs_0.6.5 profvis_0.3.8 pkgconfig_2.0.3 fastmap_1.1.1 backports_1.4.1 ellipsis_0.3.2
[19] utf8_1.2.4 promises_1.3.0 rmarkdown_2.26 sessioninfo_1.2.2 tzdb_0.4.0 nloptr_2.0.3
[25] xfun_0.43 cachem_1.0.8 later_1.3.2 parallel_4.3.3 R6_2.5.1 stringi_1.8.3
[31] parallelly_1.37.1 boot_1.3-30 pkgload_1.3.4 numDeriv_2016.8-1.1 estimability_1.5 Rcpp_1.0.12
[37] knitr_1.46 usethis_2.2.3 zoo_1.8-12 httpuv_1.6.15 Matrix_1.6-5 splines_4.3.3
[43] timechange_0.3.0 tidyselect_1.2.1 rstudioapi_0.16.0 yaml_2.3.8 TMB_1.9.11 codetools_0.2-20
[49] miniUI_0.1.1.1 listenv_0.9.1 pkgbuild_1.4.4 lattice_0.22-6 shiny_1.8.1.1 withr_3.0.0
[55] coda_0.19-4.1 evaluate_0.23 future_1.33.2 desc_1.4.3 survival_3.5-8 units_0.8-5
[61] proxy_0.4-27 urlchecker_1.0.1 fitdistrplus_1.1-11 circular_0.5-0 pillar_1.9.0 KernSmooth_2.23-22
[67] checkmate_2.3.1 generics_0.1.3 rprojroot_2.0.4 hms_1.1.3 munsell_0.5.1 scales_1.3.0
[73] minqa_1.2.6 globals_0.16.3 xtable_1.8-4 class_7.3-22 glue_1.7.0 emmeans_1.10.1
[79] tools_4.3.3 data.table_1.15.4 lme4_1.1-35.2 fs_1.6.3 mvtnorm_1.2-4 grid_4.3.3
[85] rbibutils_2.2.16 devtools_2.4.5 colorspace_2.1-0 nlme_3.1-164 ggspatial_1.1.9 cli_3.6.2
[91] fansi_1.0.6 d6_0.1.0.4 gtable_0.3.4 broom.mixed_0.2.9.5 digest_0.6.35 classInt_0.4-10
[97] TH.data_1.1-2 htmlwidgets_1.6.4 memoise_2.0.1 htmltools_0.5.8.1 lifecycle_1.0.4 mime_0.12

@jmsigner
Copy link
Owner

Thanks for reporting. Could you try with n_control = 20. This worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants