How do I install the WolfAlps module?

15 views
Skip to first unread message

dnor...@gmail.com

unread,
Jul 4, 2019, 8:26:00 PM7/4/19
to SpaDES Users
Hi,
Just starting to learn to build modules is SpaDES.
I tried following instructions here:
https://htmlpreview.github.io/?https://github.com/PredictiveEcology/wolfAlps/blob/master/wolfAlps.html

But
moduleName <- "wolfAlps"
downloadModule(moduleName, data = TRUE)

returns error: "Error in downloadModule(name, path, version, repo, data, quiet, quickCheck, :
Not Found (HTTP 404)."
How do I install the WolfAlps module?
Many thanks,
Darren

> sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17134)

Matrix products: default

locale:
[1] LC_COLLATE=Portuguese_Brazil.1252 LC_CTYPE=Portuguese_Brazil.1252
[3] LC_MONETARY=Portuguese_Brazil.1252 LC_NUMERIC=C
[5] LC_TIME=Portuguese_Brazil.1252

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

other attached packages:
[1] SpaDES.addins_0.1.2 SpaDES.tools_0.3.2 SpaDES.core_0.2.5 quickPlot_0.1.6
[5] reproducible_0.2.8 SpaDES_2.0.3

loaded via a namespace (and not attached):
[1] CircStats_0.2-6 fastdigest_0.6-3 bitops_1.0-6 fpCompare_0.2.2
[5] sf_0.7-4 flock_0.7 lubridate_1.7.4 bit64_0.9-7
[9] RColorBrewer_1.1-2 httr_1.4.0 tools_3.6.0 backports_1.1.4
[13] rgdal_1.4-4 R6_2.4.0 KernSmooth_2.23-15 rgeos_0.4-3
[17] DBI_1.0.0 lazyeval_0.2.2 colorspace_1.4-1 raster_2.9-5
[21] sp_1.3-1 tidyselect_0.2.5 gridExtra_2.3 fasterize_1.0.0
[25] curl_3.3 bit_1.1-14 compiler_3.6.0 git2r_0.26.1
[29] versions_0.3 influenceR_0.1.0 checkmate_1.9.3 scales_1.0.0
[33] classInt_0.3-3 readr_1.3.1 stringr_1.4.0 digest_0.6.19
[37] R.utils_2.9.0 pkgconfig_2.0.2 htmltools_0.3.6 DEoptim_2.2-4
[41] htmlwidgets_1.3 rlang_0.4.0 rstudioapi_0.10 RSQLite_2.1.1
[45] shiny_1.3.2 visNetwork_2.0.7 jsonlite_1.6 dplyr_0.8.2
[49] rgexf_0.15.3 R.oo_1.22.0 RCurl_1.95-4.12 magrittr_1.5
[53] Rcpp_1.0.1 munsell_0.5.0 viridis_0.5.1 R.methodsS3_1.7.1
[57] stringi_1.4.3 MASS_7.3-51.4 grid_3.6.0 blob_1.1.1
[61] promises_1.0.1 parallel_3.6.0 crayon_1.3.4 miniUI_0.1.1.1
[65] lattice_0.20-38 hms_0.4.2 pillar_1.4.2 tcltk_3.6.0
[69] igraph_1.2.4.1 boot_1.3-22 gdalUtils_2.0.1.14 ffbase_0.12.7
[73] codetools_0.2-16 fastmatch_1.1-0 XML_3.98-1.20 glue_1.3.1
[77] downloader_0.4 data.table_1.12.2 remotes_2.1.0 httpuv_1.5.1
[81] foreach_1.4.4 testthat_2.1.1 gtable_0.3.0 archivist_2.3.2
[85] purrr_0.3.2 tidyr_0.8.3 assertthat_0.2.1 ggplot2_3.2.0
[89] gridBase_0.4-7 mime_0.7 xtable_1.8-4 ff_2.2-14
[93] e1071_1.7-2 later_0.8.0 class_7.3-15 googledrive_0.1.3
[97] viridisLite_0.3.0 tibble_2.1.3 iterators_1.0.10 memoise_1.1.0
[101] units_0.6-3 Rook_1.1-1 DiagrammeR_1.0.1 brew_1.0-6
>

Alex Chubaty

unread,
Jul 4, 2019, 10:17:11 PM7/4/19
to SpaDES Users
Hmm... you're right. Sorry about that. We are looking into it.

In the mean time, simply download the module manually from https://github.com/PredictiveEcology/wolfAlps/raw/master/wolfAlps_1.2.0.zip and carry on with the example from there.

Alex

dnor...@gmail.com

unread,
Jul 5, 2019, 6:07:32 PM7/5/19
to SpaDES Users
Dear Alex, many thanks for the quick help.
Now downloaded and extracted the module to my module folder.
But now have an error with the first simInit example.
Can someone check whether this is something general or is it me (I believe I have all paths correctly specified following the example etc).

"Error in dirname(names(modulesToSearch[isParent])) :
a character vector argument expected "

Code below,
Many thanks,
Darren

times <- list(start = 0, end = 14, timeunit = "year")
modules <- list("wolfAlps")
moduleDir <- "C:/Users/Darren/Documents/2018 Unifilis demography/analysis/cmartr/inst/spadesdn/modules"
paths <- list(
modulePath = moduleDir,
cachePath = file.path(moduleDir, "outputR", "cache"),
inputPath = file.path(moduleDir, "wolfAlps", "data"),
outputPath = file.path(moduleDir, "outputR")
)
inputs <- data.frame(file = c("wolves2008.asc", "packs2008.asc",
"CMR.asc", "HabitatSuitability.asc"))
# accept default parameters for now
wolfModuleStart <- simInit(times = times,
#params = list(wolfAlps = parameters),
modules = modules, inputs = inputs, paths = paths)

Error in dirname(names(modulesToSearch[isParent])) :
a character vector argument expected

Tati Micheletti

unread,
Jul 6, 2019, 1:20:33 PM7/6/19
to SpaDES Users
Hi Darren,

I just tested the module myself from scratch (I didn't have it in my home computer, so I went through the same process you went through), and it worked for me. 
I think your problem might be a path issue. Can you print the paths that are being set (paths) and compare these to your folder structure to make sure everything is pointing to the right directory? Another thing I would suggest is to use a more direct path (we have seen some problems with long paths already, yours is 9 levels deep). Let me know if these work, if not, we will keep debugging. :)

Have a good weekend,

Tati

Capture.PNG
Reply all
Reply to author
Forward
0 new messages