From dcab896354c567b6ed857b39a67c2bd35a0ebaed Mon Sep 17 00:00:00 2001 From: "Adam H. Sparks" Date: Tue, 29 Oct 2024 16:19:44 +0800 Subject: [PATCH] Forgot to export `get_smips()` --- NAMESPACE | 1 + R/get_smips.R | 8 +++++++- man/get_smips.Rd | 7 +++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/NAMESPACE b/NAMESPACE index 8d46268..cf49c3d 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,5 +1,6 @@ # Generated by roxygen2: do not edit by hand export(get_key) +export(get_smips) export(plot) importFrom(terra,plot) diff --git a/R/get_smips.R b/R/get_smips.R index 07acd0b..9d255db 100644 --- a/R/get_smips.R +++ b/R/get_smips.R @@ -14,9 +14,15 @@ #' @param dates A date to query, _e.g._, `date = 2017-12-31`, both `Character` or #' `Date` classes are accepted. #' +#' @examples +#' r <- get_smips(dates = "2024-01-01") +#' +#' # terra::plot() is re-exported for convience +#' plot(r) +#' #' @return A [terra::rast] object - #' @references +#' @export get_smips <- function(collection = "totalbucket", dates, api_key = get_key()) { diff --git a/man/get_smips.Rd b/man/get_smips.Rd index 04f7151..66a4b51 100644 --- a/man/get_smips.Rd +++ b/man/get_smips.Rd @@ -27,6 +27,13 @@ A \link[terra:rast]{terra::rast} object } \description{ Soil Moisture Integration and Prediction System (\acronym{SMIPS}) v1.0. +} +\examples{ +r <- get_smips(dates = "2024-01-01") + +# terra::plot() is re-exported for convience +plot(r) + } \references{ \url{https://portal.tern.org.au/metadata/TERN/d1995ee8-53f0-4a7d-91c2-ad5e4a23e5e0https://geonetwork.tern.org.au/geonetwork/srv/eng/catalog.search#/metadata/d1995ee8-53f0-4a7d-91c2-ad5e4a23e5e0}