het-test-script.R error: $ operator is invalid for atomic vectors
rachelkunowski opened this issue · 1 comments
Hello,
I get this error when running the het-test-script.R that occurs in line 21 and after:
param <- param_het()
Error: $ operator is invalid for atomic vectors
init <- init_het(i.prev.male = 0.25, i.prev.feml = 0.25)
control <- control_het(nsteps = 2600)sim <- netsim(est, param, init, control)
Error in UseMethod("as.control.list") :
no applicable method for 'as.control.list' applied to an object of class "control.net"
Would this be due to version problem? My sessionInfo() is the following:
sessionInfo()
R version 4.1.2 (2021-11-01)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.2.1
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ARTnet_2.5.0 ARTnetData_1.1 EpiModelHIV_1.5.0
[4] tergmLite_2.5.5 EpiModelHPC_2.1.2 EpiModel_2.2.1
[7] statnet.common_4.5.0 tergm_4.0.2 ergm_4.1.2
[10] networkDynamic_0.11.0 network_1.17.1 deSolve_1.30
[13] tictoc_1.0.1 forcats_0.5.1 stringr_1.4.0
[16] dplyr_1.0.7 purrr_0.3.4 readr_2.1.2
[19] tidyr_1.2.0 tibble_3.1.6 ggplot2_3.3.5
[22] tidyverse_1.3.1 readxl_1.3.1 rlang_1.0.1
[25] assertthat_0.2.1 truncnorm_1.0-8 ensurer_1.1
[28] gtools_3.9.2
loaded via a namespace (and not attached):
[1] colorspace_2.0-2 ellipsis_0.3.2
[3] class_7.3-19 rprojroot_2.0.2
[5] fs_1.5.2 rstudioapi_0.13
[7] proxy_0.4-26 remotes_2.4.2
[9] fansi_1.0.2 mvtnorm_1.1-3
[11] lubridate_1.8.0 xml2_1.3.3
[13] codetools_0.2-18 doParallel_1.0.17
[15] cachem_1.0.6 robustbase_0.93-9
[17] pkgload_1.2.4 jsonlite_1.7.2
[19] broom_0.7.12 dbplyr_2.1.1
[21] compiler_4.1.2 httr_1.4.2
[23] backports_1.4.1 Matrix_1.3-4
[25] fastmap_1.1.0 lazyeval_0.2.2
[27] cli_3.1.1 prettyunits_1.1.1
[29] tools_4.1.2 coda_0.19-4
[31] gtable_0.3.0 glue_1.6.1
[33] Rcpp_1.0.8 rle_0.9.2
[35] cellranger_1.1.0 vctrs_0.3.8
[37] ape_5.6-1 nlme_3.1-153
[39] iterators_1.0.14 ps_1.6.0
[41] testthat_3.1.1 trust_0.1-8
[43] rvest_1.0.2 lifecycle_1.0.1
[45] devtools_2.4.3 DEoptimR_1.0-10
[47] MASS_7.3-54 scales_1.1.1
[49] hms_1.1.1 parallel_4.1.2
[51] RColorBrewer_1.1-2 memoise_2.0.1
[53] stringi_1.7.6 desc_1.4.0
[55] foreach_1.5.2 e1071_1.7-9
[57] pkgbuild_1.3.1 pkgconfig_2.0.3
[59] lpSolveAPI_5.5.2.0-17.7 lattice_0.20-45
[61] processx_3.5.2 tidyselect_1.1.1
[63] magrittr_2.0.2 R6_2.5.1
[65] generics_0.1.2 DBI_1.1.2
[67] pillar_1.7.0 haven_2.4.3
[69] withr_2.4.3 bindata_0.9-20
[71] modelr_0.1.8 crayon_1.4.2
[73] utf8_1.2.2 tzdb_0.2.0
[75] usethis_2.1.5 grid_4.1.2
[77] callr_3.7.0 reprex_2.0.1
[79] munsell_0.5.0 sessioninfo_1.2.2
Sorry, we haven't worked on the heterosexual HIV transmission model for a few years, so the test script here is undoubtably out of sync with the software.