Skip to content

Commit

Permalink
Updates docs and files
Browse files Browse the repository at this point in the history
  • Loading branch information
8Ginette8 committed Feb 4, 2025
1 parent 9942cca commit aa7c89b
Show file tree
Hide file tree
Showing 28 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion R/evaluate_range.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#' region (see 'mask') and aggregations of the input maps to different resolutions,
#' given the importance of these factors for specific applications (Pinkert et al., 2023).
#' @param root_dir Character. Working directory to load and save target files.
#' @param valData_dir Numeric. Directory to validation data.
#' @param valData_dir Numeric. Directory to validation spatial data (must have same name as data in ecoRM_dir)
#' @param ecoRM_dir Numeric. Directory to range maps (generated with get_range).
#' @param valData_type Character. Type of valData - either "SHP" or "TIFF".
#' @param verbose Logical (optional). Report details while running.
Expand Down
8 changes: 4 additions & 4 deletions inst/examples/evaluate_range_help.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# EcoRM evaluation at different resolutions (>4min runtime)
root.dir <- list.files(system.file(package = "gbif.range"), pattern = "extdata", full.names = TRUE)

res1km <- evaluate_range(root_dir = root.dir,
res5km <- evaluate_range(root_dir = root.dir,
valData_dir = "SDM",
ecoRM_dir = "EcoRM",
verbose = TRUE,
Expand All @@ -18,7 +18,7 @@ res10km <- evaluate_range(root_dir = root.dir,
print_map = TRUE,
valData_type = "TIFF",
mask = NULL,
res_fact = 10)
res_fact = 2)


# Extract and plot a specific overlay map
Expand Down Expand Up @@ -48,12 +48,12 @@ legend("bottomright",

## Compare sensitivity and precision outputs ##
# Calculate overall performance (e.g. mean sensitivity & precision)
res1km$df_eval$Mean_SenPrec <- (res1km$df_eval$Sen_ecoRM + res1km$df_eval$Prec_ecoRM) / 2
res5km$df_eval$Mean_SenPrec <- (res5km$df_eval$Sen_ecoRM + res5km$df_eval$Prec_ecoRM) / 2
res10km$df_eval$Mean_SenPrec <- (res10km$df_eval$Sen_ecoRM + res10km$df_eval$Prec_ecoRM) / 2

# Combine the data frames and add a Resolution column
combined_df <- rbind(
cbind(res1km$df_eval, Resolution = "1km"),
cbind(res5km$df_eval, Resolution = "1km"),
cbind(res10km$df_eval, Resolution = "10km")
)

Expand Down
Binary file added inst/extdata/EcoRM/Arctostaphylos_alpinus.tif
Binary file not shown.
Binary file modified inst/extdata/EcoRM/Atropa_bella-donna.tif
Binary file not shown.
Binary file modified inst/extdata/EcoRM/Centaurea_montana.tif
Binary file not shown.
Binary file modified inst/extdata/EcoRM/Cirsium_rivulare.tif
Binary file not shown.
Binary file modified inst/extdata/EcoRM/Cupressus_sempervirens.tif
Binary file not shown.
Binary file modified inst/extdata/EcoRM/Pinus_nigra.tif
Binary file not shown.
Binary file modified inst/extdata/EcoRM/Plantago_alpina.tif
Binary file not shown.
Binary file modified inst/extdata/EcoRM/Plantago_media.tif
Binary file not shown.
Binary file modified inst/extdata/EcoRM/Prunella_vulgaris.tif
Binary file not shown.
Binary file added inst/extdata/EcoRM/Salvia_pratensis.tif
Binary file not shown.
Binary file removed inst/extdata/EcoRM/Salvia_pratensis_pratensis.tif
Binary file not shown.
Binary file modified inst/extdata/EcoRM/Tragopogon_dubius.tif
Binary file not shown.
Binary file added inst/extdata/SDM/Arctostaphylos_alpinus.tif
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
10 changes: 5 additions & 5 deletions man/evaluate_range.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit aa7c89b

Please sign in to comment.