Skip to content

Commit

Permalink
Merge pull request #17 from jamestsakalos/test-elev
Browse files Browse the repository at this point in the history
Test elev.R
  • Loading branch information
jamestsakalos committed Jul 17, 2023
2 parents c5ba5f0 + 70f1d06 commit f6612fa
Show file tree
Hide file tree
Showing 33 changed files with 865 additions and 170 deletions.
7 changes: 6 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ Imports:
climaemet,
dismo,
dplyr,
elevatr,
elevatr (>= 1.0),
exactextractr,
geodata,
glue,
macroBiome,
methods,
plyr,
randomForest,
sf,
Expand All @@ -53,12 +54,16 @@ Suggests:
covr,
fs,
knitr,
progress,
raster,
rmarkdown,
testthat (>= 3.0.0),
vdiffr
Remotes:
jhollist/elevatr
Config/Needs/check: rcmdcheck
Config/Needs/coverage: covr
Config/Needs/website: pkgdown
Config/testthat/edition: 3
RoxygenNote: 7.2.3
Roxygen: list(markdown = TRUE)
8 changes: 7 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ importFrom(dplyr,group_by)
importFrom(dplyr,summarize)
importFrom(elevatr,get_elev_raster)
importFrom(exactextractr,exact_extract)
importFrom(geodata,elevation_3s)
importFrom(geodata,worldclim_tile)
importFrom(glue,glue)
importFrom(graphics,axis)
Expand All @@ -28,10 +27,12 @@ importFrom(graphics,points)
importFrom(graphics,strwidth)
importFrom(graphics,text)
importFrom(macroBiome,cliHoldridgePoints)
importFrom(methods,as)
importFrom(plyr,round_any)
importFrom(randomForest,importance)
importFrom(randomForest,randomForest)
importFrom(randomForest,varImpPlot)
importFrom(sf,"st_crs<-")
importFrom(sf,as_Spatial)
importFrom(sf,st_as_sf)
importFrom(sf,st_bbox)
Expand All @@ -42,10 +43,15 @@ importFrom(sp,SpatialPolygonsDataFrame)
importFrom(stats,aggregate)
importFrom(stats,sd)
importFrom(terra,centroids)
importFrom(terra,colFromCell)
importFrom(terra,crds)
importFrom(terra,crs)
importFrom(terra,extract)
importFrom(terra,mask)
importFrom(terra,mosaic)
importFrom(terra,rast)
importFrom(terra,rasterize)
importFrom(terra,rowFromCell)
importFrom(terra,vect)
importFrom(terra,writeRaster)
importFrom(terra,xyFromCell)
Expand Down
2 changes: 1 addition & 1 deletion R/ce_download.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' @param \dots Arguments to control a download from the Internet
#' `download.file()`.
#'
#' @return
#' @returns
#' See documentation from [`chelsa()`], [`worldclim()`] and
#' [`elev()`].
#'
Expand Down
4 changes: 2 additions & 2 deletions R/ce_extract.R
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@

# Assigns an 'id' if location_g is empty
if (is.null(location_g)) {
message(
warning(
paste(
"location_g must be one of",
paste(setdiff(colnames(location_df), c("coords.x1", "coords.x2")),
Expand Down Expand Up @@ -347,7 +347,7 @@
#' @template output_c_source_param
#' @template output_var_param
#'
#' @return
#' @returns
#' Returns a list storing matrices containing the mean and standard deviation
#' of the climate and/or elevation data. Each column represents a month, each
#' row represents a feature of the \code{location} \code{sp}, \code{sf} polygon
Expand Down
2 changes: 1 addition & 1 deletion R/chelsa.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#' @param quiet,\dots Arguments to control a download from the Internet
#' `download.file()`.
#'
#' @return
#' @returns
#' Returns four subfolders named prec, tmax, tmin and tmean. Each folder
#' contains 12 GeoTiff (.tif) files, one for each month of the year for the time
#' period 1981&ndash;2010. Each of the files are downloaded at a spatial
Expand Down
15 changes: 15 additions & 0 deletions R/data_srtm_tiles.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
##' STRM tiles data
##'
##' SRTM tiles data.
##'
##' @docType data
##' @format{ An object of class \code{SpatialPolygonsDataFrame} with 872 rows
##' and 1 columns.}
##' @details Contains tiles to assist downloading from 'geodata'.
##' @encoding UTF-8
##' @keywords datasets
##' @rdname srtm_tiles
##' @examples
##' data("srtm_tiles", package = "climenv")
##' head(srtm_tiles)
"srtm_tiles"

0 comments on commit f6612fa

Please sign in to comment.