Skip to content

Commit

Permalink
v2.0.4 merge
Browse files Browse the repository at this point in the history
Merge branch 'master' into biomodelos

# Conflicts:
#	DESCRIPTION
#	README.md
#	inst/shiny/Rmd/text_about.Rmd
#	inst/shiny/Rmd/text_intro_tab.Rmd
#	inst/shiny/Rmd/userReport_intro.Rmd
  • Loading branch information
bjohnso005 committed Mar 16, 2023
2 parents 7cc5e10 + bf58390 commit 08d296b
Show file tree
Hide file tree
Showing 11 changed files with 652 additions and 53 deletions.
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
wallace 2.0.4
=============
- Added Spanish translation of vignette
- Updates to v2 vignette
- `skip_on_cran()` added to several tests

wallace 2.0.3
=============
- Fix conditional in test for occs_queryDB
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ If PDF downloading of session code is not working for you, please follow the fol
- Step 3: To set this path variable run: `Sys.setenv(PATH=paste(Sys.getenv("PATH"),"C:/Program Files/MiKTeX 2.9/miktex/bin/x64/",sep=";"))`.

#### Windows Users: Only for Github installation
If you are using Windows, please download and install <a href="https://cran.r-project.org/bin/windows/Rtools/" target="_blank">RTools</a> before installing the `devtools` package. After you install RTools, please make sure you add "C:\Rtools\bin" to your PATH variable (instructions <a href="https://stackoverflow.com/a/29480538/1274346" target="_blank">here</a>). Additionally, when using `devtools` on Windows machines, there is a known <a href="https://github.com/r-lib/devtools/issues/1298" target="_blank">bug</a> that sometimes results in the inability to download all package dependencies. If this happens to you, please install the packages and their dependencies directly from CRAN.
If you are using Windows, please download and install <a href="https://cran.r-project.org/bin/windows/Rtools/" target="_blank">RTools</a> before installing the `devtools` package. After you install RTools, please make sure you add "C:\Rtools\bin" to your PATH variable (instructions <a href="https://stackoverflow.com/questions/29129681/create-zip-file-error-running-command-had-status-127/29480538#29480538" target="_blank">here</a>). Additionally, when using `devtools` on Windows machines, there is a known <a href="https://github.com/r-lib/devtools/issues/1298" target="_blank">bug</a> that sometimes results in the inability to download all package dependencies. If this happens to you, please install the packages and their dependencies directly from CRAN.

#### Any other problems with install_github()
Although the recommended way to install is through CRAN, if you are trying to install the Github version and are having problems, follow these steps.
Expand Down
5 changes: 2 additions & 3 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ navbar:
menu:
- text: Tutorial Vignette v2
href: articles/tutorial-v2.html
- text: Tutorial Vignette v2 (ESP)
href: articles/tutorial-v2-esp.html
- text: Module addition
href: articles/module-addition.html
- text: -------
- text: "Beta Testing"
- text: Install instructions
href: articles/beta-testing.html
- text: "Archive"
- text: Tutorial Vignette v1
href: articles/tutorial-v1.html
Expand Down
48 changes: 24 additions & 24 deletions inst/CITATION
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
citHeader("To cite wallace in publications use:")

citEntry(
entry = "Article",
bibentry(
bibtype = "Article",
title = "wallace 2: a shiny app for modeling species niches and distributions redesigned to facilitate expansion via module contributions",
author = personList(
as.person("J. M. Kass"),
as.person("G. E. Pinilla-Buitrago"),
as.person("A. Paz"),
as.person("B. A. Johnson"),
as.person("V. Grisales-Betancur"),
as.person("S. I. Meenan"),
as.person("D. Attali"),
as.person("O. Broennimann"),
as.person("P. J. Galante"),
as.person("B. S. Maitner"),
as.person("H. L. Owens"),
as.person("S. Varela"),
as.person("M. E. Aiello-Lammens"),
as.person("C. Merow"),
as.person("M. E. Blair"),
as.person("R. P. Anderson")
author = c(
person("J. M. Kass"),
person("G. E. Pinilla-Buitrago"),
person("A. Paz"),
person("B. A. Johnson"),
person("V. Grisales-Betancur"),
person("S. I. Meenan"),
person("D. Attali"),
person("O. Broennimann"),
person("P. J. Galante"),
person("B. S. Maitner"),
person("H. L. Owens"),
person("S. Varela"),
person("M. E. Aiello-Lammens"),
person("C. Merow"),
person("M. E. Blair"),
person("R. P. Anderson")
),
journal = "Ecography",
year = "2022",
volume = "",
year = "2023",
volume = "2023(3)",
number = "e06547",
pages = "",
url = "",
pages = "1-9",
url = "https://onlinelibrary.wiley.com/doi/full/10.1111/ecog.06547",
textVersion =
paste("Kass, J.M., Pinilla-Buitrago, G.E., Paz, A., Johnson, B.A., Grisales-Betancur, V., Meenan, S.I., Attali, D., Broennimann, O., Galante, P.J., Maitner, B.S., Owens, H., Varela, S., Aiello-Lammens, Merow, C., M.E., Blair, M.E. & Anderson, R.P. (2022). wallace 2: a shiny app for modeling species niches and distributions redesigned to facilitate expansion via module contributions. Ecography, e06547. <https://doi.org/10.1111/ecog.06547>")
paste("Kass, J.M., Pinilla-Buitrago, G.E., Paz, A., Johnson, B.A., Grisales-Betancur, V., Meenan, S.I., Attali, D., Broennimann, O., Galante, P.J., Maitner, B.S., Owens, H., Varela, S., Aiello-Lammens, Merow, C., M.E., Blair, M.E. & Anderson, R.P. (2023). wallace 2: a shiny app for modeling species niches and distributions redesigned to facilitate expansion via module contributions. Ecography, e06547. <https://doi.org/10.1111/ecog.06547>")
)
16 changes: 9 additions & 7 deletions inst/shiny/Rmd/text_how_to_use.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ output: html_document
---

### **Overview of** ***Wallace***
This information is designed to orient the user to the *Wallace* interface. For detailed instructions and a sample walkthrough, please consult the <a href="" target="_blank">vignette</a>.
This information is designed to orient the user to the *Wallace* interface. For detailed instructions and a sample walkthrough, please consult the <a href="https://wallaceecomod.github.io/wallace/articles/tutorial-v2.html" target="_blank">vignette</a>.

*Para obtener instrucciones detalladas y un tutorial de muestra en español, consulte <a href="https://wallaceecomod.github.io/wallace/articles/tutorial-v2-esp.html" target="_blank">la viñeta en español</a>.*

#### **Components and Modules**
*Wallace* is composed of **Components** – discrete steps in the workflow. Navigate through the components by clicking on the names in the top orange navigation panel. Components need to be run consecutively, but a few are optional (e.g., **Env Space**).
Expand Down Expand Up @@ -38,17 +40,17 @@ Closing the browser window will terminate the Wallace analysis, but R will remai
#### **References**
Anderson, R. P. (2015). El modelado de nichos y distribuciones: no es simplemente "clic, clic, clic." [With English and French translations: Modeling niches and distributions: it's not just "click, click, click" and La modélisation de niche et de distributions: ce n'est pas juste "clic, clic, clic"]. *Biogeografía*, 8, 4-27. <a href="https://2278aec0-37af-4634-a250-8bb191f1aab7.filesusr.com/ugd/e41566_e8acb6f9c20c44fa9cd729161582857d.pdf" target="_blank">pdf</a>

Anderson, R.P. (2012). Harnessing the world's biodiversity data: promise and peril in ecological niche modeling of species distributions. *Annals of the New York Academy of Sciences*, 1260(1), 66-80. <a href="https://doi.org/10.1111/j.1749-6632.2011.06440.x" target="_blank">https://doi.org/10.1111/j.1749-6632.2011.06440.x</a>
Anderson, R.P. (2012). Harnessing the world's biodiversity data: promise and peril in ecological niche modeling of species distributions. *Annals of the New York Academy of Sciences*, 1260(1), 66-80. <a href="https://doi.org/10.1111/j.1749-6632.2011.06440.x" target="_blank">DOI:10.1111/j.1749-6632.2011.06440.x</a>

Franklin, J. (2010). *Mapping species distributions*. Cambridge University Press. <a href="https://doi.org/10.1017/CBO9780511810602" target="_blank">https://doi.org/10.1017/CBO9780511810602</a>
Franklin, J. (2010). *Mapping species distributions*. Cambridge University Press. <a href="https://doi.org/10.1017/CBO9780511810602" target="_blank">DOI:10.1017/CBO9780511810602</a>

Guisan, A., Thuiller, W., & Zimmermann, N. E. (2017). Habitat suitability and distribution models: With applications in R. Cambridge University Press. <a href="https://doi.org/10.1017/9781139028271" target="_blank">https://doi.org/10.1017/9781139028271</a>
Guisan, A., Thuiller, W., & Zimmermann, N. E. (2017). Habitat suitability and distribution models: With applications in R. Cambridge University Press. <a href="https://doi.org/10.1017/9781139028271" target="_blank">DOI:10.1017/9781139028271</a>

Kass, J.M., Vilela, B., Aiello-Lammens, M.E., Muscarella, R., Merow, C., & Anderson, R.P. (2018). Wallace: A flexible platform for reproducible modeling of species niches and distributions built for community expansion. *Methods in Ecology and Evolution*, 9(4), 1151-1156. <a href="https://doi.org/10.1111/2041-210X.12945" target="_blank">https://doi.org/10.1111/2041-210X.12945</a>
Kass, J.M., Vilela, B., Aiello-Lammens, M.E., Muscarella, R., Merow, C., & Anderson, R.P. (2018). Wallace: A flexible platform for reproducible modeling of species niches and distributions built for community expansion. *Methods in Ecology and Evolution*, 9(4), 1151-1156. <a href="https://doi.org/10.1111/2041-210X.12945" target="_blank">DOI:10.1111/2041-210X.12945</a>

Peterson, A. T. et al. (2022). ENM2020: A Free Online Course and Set of Resources on Modeling Species’ Niches and Distributions. *Biodiversity Informatics*, 17. <a href="https://doi.org/10.17161/bi.v17i.15016" target="_blank">https://doi.org/10.17161/bi.v17i.15016</a>
Peterson, A. T. et al. (2022). ENM2020: A Free Online Course and Set of Resources on Modeling Species’ Niches and Distributions. *Biodiversity Informatics*, 17. <a href="https://doi.org/10.17161/bi.v17i.15016" target="_blank">DOI:10.17161/bi.v17i.15016</a>

Peterson, A. T., Soberón, J., Pearson, R. G., Anderson, R. P., Martínez-Meyer, E., Nakamura, M., & Araújo, M. B. (2011). *Ecological niches and geographic distributions* (MPB-49). Princeton University Press. <a href="https://press.princeton.edu/books/paperback/9780691136882/ecological-niches-and-geographic-distributions-mpb-49" target="_blank">Princeton University Press</a>

Zurell, D., Franklin, J., König, C., Bouchet, P.J., Dormann, C.F., Elith, J., Fandos, G., Feng, X., Guillera-Arroita, G., Guisan, A., Lahoz-Monfort, J.J., Leitão, P.J., Park, D.S., Peterson, A.T., Rapacciuolo, G., Schmatz, D.R., Schröder, B., Serra-Diaz, J.M., Thuiller, W., Yates, K.L., Zimmermann,N.E., & Merow, C. (2020). A standard protocol for reporting species distribution models. *Ecography*, 43(9), 1261-1277. <a href="https://doi.org/10.1111/ecog.04960" target="_blank">https://doi.org/10.1111/ecog.04960</a>
Zurell, D., Franklin, J., König, C., Bouchet, P.J., Dormann, C.F., Elith, J., Fandos, G., Feng, X., Guillera-Arroita, G., Guisan, A., Lahoz-Monfort, J.J., Leitão, P.J., Park, D.S., Peterson, A.T., Rapacciuolo, G., Schmatz, D.R., Schröder, B., Serra-Diaz, J.M., Thuiller, W., Yates, K.L., Zimmermann,N.E., & Merow, C. (2020). A standard protocol for reporting species distribution models. *Ecography*, 43(9), 1261-1277. <a href="https://doi.org/10.1111/ecog.04960" target="_blank">DOI:10.1111/ecog.04960</a>

4 changes: 4 additions & 0 deletions tests/testthat/test_envs_ecoClimate.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ bcScenarioFail='Present'

##start testing
test_that('error_checks', {
# skip on CRAN
skip_on_cran()
# Skip if cannot download
skip_if(class(varsEcoClimate) == "try-error")
##wrong AOGCM
Expand All @@ -40,6 +42,8 @@ test_that('error_checks', {
})

test_that('output_checks', {
# skip on CRAN
skip_on_cran()
# Skip if cannot download
skip_if(class(varsEcoClimate) == "try-error")
#output is a rasterstack
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test_envs_worldclim.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ test_that("error checks", {

### test output features
test_that("output type checks", {
# skip on CRAN
skip_on_cran()
# the output is a RasterBrick
expect_is(arcmin10, "RasterStack")
# the number of layer is the same as specified in the selected variables list
Expand Down
10 changes: 7 additions & 3 deletions tests/testthat/test_occs_paleoDb.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ context("paleoDb")
spName <- "Didelphis virginiana"
spNameError <- "Panthera onc"
genus <- "panthera"
#maximum number of occurences to download
#maximum number of occurrences to download
occNum <- 100
# For PaleobioDB only Holocene is allowed.
timeInterval <- "Holocene"
Expand All @@ -19,7 +19,7 @@ if (Sys.info()['sysname'] != "Windows") {
}


###Test that erorrs check
###Test that errors check
### test if the error messages appear when they are supposed to
test_that("error checks", {
# paleobioDB failing in Windows
Expand Down Expand Up @@ -56,6 +56,8 @@ test_that("error checks", {
test_that("output type checks", {
# paleobioDB failing in Windows
skip_on_os("windows")
# skip on CRAN
skip_on_cran()
#output is a list
expect_is(occsPaleo, "list")
#List has two elements
Expand All @@ -64,6 +66,8 @@ test_that("output type checks", {
test_that("output data checks", {
# paleobioDB failing in Windows
skip_on_os("windows")
# skip on CRAN
skip_on_cran()
# if the original database has records without coordinates OR duplicates:
if ((TRUE %in% duplicated(occsPaleo$orig[,c('longitude','latitude')]) == TRUE) |
(NA %in% occsPaleo$orig[,c('longitude','latitude')]) == TRUE){
Expand Down Expand Up @@ -93,7 +97,7 @@ test_that("headers check", {
skip_on_os("windows")
#
expect_false('FALSE' %in% (keyPaleoHeaders %in% names(occsPaleo$orig)))
# the headers in the claned table are the ones specified in the function
# the headers in the cleaned table are the ones specified in the function
expect_equal(names(occsPaleo$cleaned),c(keyPaleoHeaders,"pop"))
})

Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test_occs_queryDb.R
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ test_that("GBIF headers", {
skip_if(class(out.gbif) == "try-error")
# the original headers haven't changed
expect_false('FALSE' %in% (headersGBIF %in% names(out.gbif[[i]]$orig)))
# the headers in the claned table are the ones specified in the function
# the headers in the cleaned table are the ones specified in the function
expect_equal(names(out.gbif[[i]]$cleaned),
c("occID", "scientific_name", "longitude", "latitude", "country",
"state_province", "locality", "year", "record_type",
Expand Down Expand Up @@ -242,7 +242,7 @@ for (i in 1:length(spNames)) {
# test_that("Bison headers", {
# # the original headers haven't changed
# expect_false('FALSE' %in% (headersBison %in% names(out.bison[[i]]$orig)))
# # the headers in the claned table are the ones specified in the function
# # the headers in the cleaned table are the ones specified in the function
# expect_equal(names(out.bison[[i]]$cleaned),
# c("occID", "scientific_name", "longitude", "latitude", "country",
# "state_province", "locality", "year", "record_type","catalog_number",
Expand Down Expand Up @@ -295,7 +295,7 @@ headersBien <- c("scrubbed_species_binomial", "longitude", "latitude",
# test_that("Bien headers", {
# # the original headers haven't changed
# expect_false('FALSE' %in% (headersBien %in% names(out.bien[[i]]$orig)))
# # the headers in the claned table are the ones specified in the function
# # the headers in the cleaned table are the ones specified in the function
# expect_equal(names(out.bien[[i]]$cleaned),
# c("occID", "scientific_name", "longitude", "latitude", "country",
# "state_province", "locality", "year", "record_type", "catalog_number",
Expand Down
Loading

0 comments on commit 08d296b

Please sign in to comment.