Skip to content

Commit

Permalink
fix variables
Browse files Browse the repository at this point in the history
  • Loading branch information
brownag committed Dec 20, 2023
1 parent fd5b59d commit 594e4d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions R/fetchSoilGrids.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#' @param overwrite Only used when `grid=TRUE`. Default: `FALSE`
#' @param target_resolution Only used when `grid=TRUE`. Default: `c(250, 250)` (250m x 250m pixels)
#' @param summary_type Only used when `grid=TRUE`. One or more of `"Q0.05"`, `"Q0.5"`, `"Q0.95"`, `"mean"`; these are summary statistics that
#' corresponding to 5th, 50th and 95th percentiles and mean value for selected `variables`.
#' correspond to 5th, 50th, 95th percentiles, and mean value for selected `variables`.
#' @param ... Additional arguments passed to `terra::writeRaster()` when `grid=TRUE`.
#' @param verbose Print messages? Default: `FALSE`
#' @param progress logical, give progress when iterating over multiple requests; Default: `FALSE`
Expand Down Expand Up @@ -124,6 +124,7 @@ fetchSoilGrids <- function(x,
return(.get_soilgrids(locations,
filename = filename,
overwrite = overwrite,
variables = variables,
target_resolution = target_resolution,
depth = depth_intervals,
summary_type = summary_type,
Expand Down Expand Up @@ -307,7 +308,7 @@ fetchSoilGrids <- function(x,
stopifnot(requireNamespace("terra"))
stopifnot(requireNamespace("sf"))

if (!all(substr(depth, nchar(depth) - 2, nchar(depth)) == "cm")) {
if (!all(substr(depth, nchar(depth) - 1, nchar(depth)) == "cm")) {
depth <- paste0(depth, "cm")
}

Expand Down
2 changes: 1 addition & 1 deletion man/fetchSoilGrids.Rd

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

0 comments on commit 594e4d6

Please sign in to comment.