From ea40f6ad070c83807ce21d79de5557d880c71c74 Mon Sep 17 00:00:00 2001 From: Ludwigm6 Date: Wed, 13 Mar 2024 11:13:59 +0100 Subject: [PATCH] Cookfarm documentation bugfix --- R/cookfarm.R | 5 ++--- man/cookfarm.Rd | 5 ++--- man/geodist.Rd | 1 + 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/R/cookfarm.R b/R/cookfarm.R index 17df3a8e..93b6c16f 100644 --- a/R/cookfarm.R +++ b/R/cookfarm.R @@ -8,14 +8,13 @@ #' \item{VW}{Response Variable - Soil Moisture} #' \item{altitude}{Measurement depth of VW} #' \item{Date, cdata}{Measurement Date, Cumulative Date} -#' \item{Easting, Northing}{Location in EPSG:????} -#' \item{DEM, TWI, NDRE.M, NDRE.Sd, Precip_wrcc, MaxT_wrcc, MinT_wrcc, Precip_cum} +#' \item{Easting, Northing}{Location Coordinates (EPSG:26911)} +#' \item{DEM, TWI, NDRE.M, NDRE.Sd, Precip_wrcc, MaxT_wrcc, MinT_wrcc, Precip_cum}{Predictor Variables} #' } #' #' @references \itemize{ #' \item{Gash et al. 2015 - Spatio-temporal interpolation of soil water, temperature, and electrical conductivity in 3D + T: The Cook Agronomy Farm data set \doi{https://doi.org/10.1016/j.spasta.2015.04.001}} #' \item{Meyer et al. 2018 - Improving performance of spatio-temporal machine learning models using forward feature selection and target-oriented validation \doi{https://doi.org/10.1016/j.envsoft.2017.12.001}} -#' #' } #' @usage data(cookfarm) #' diff --git a/man/cookfarm.Rd b/man/cookfarm.Rd index 406c670a..3e7f5d42 100644 --- a/man/cookfarm.Rd +++ b/man/cookfarm.Rd @@ -11,8 +11,8 @@ A sf data.frame with 128545 rows and 17 columns: \item{VW}{Response Variable - Soil Moisture} \item{altitude}{Measurement depth of VW} \item{Date, cdata}{Measurement Date, Cumulative Date} - \item{Easting, Northing}{Location in EPSG:????} - \item{DEM, TWI, NDRE.M, NDRE.Sd, Precip_wrcc, MaxT_wrcc, MinT_wrcc, Precip_cum} + \item{Easting, Northing}{Location Coordinates (EPSG:26911)} + \item{DEM, TWI, NDRE.M, NDRE.Sd, Precip_wrcc, MaxT_wrcc, MinT_wrcc, Precip_cum}{Predictor Variables} } } \usage{ @@ -25,7 +25,6 @@ spatio-temporal data of soil properties and associated predictors for the Cookfa \itemize{ \item{Gash et al. 2015 - Spatio-temporal interpolation of soil water, temperature, and electrical conductivity in 3D + T: The Cook Agronomy Farm data set \doi{https://doi.org/10.1016/j.spasta.2015.04.001}} \item{Meyer et al. 2018 - Improving performance of spatio-temporal machine learning models using forward feature selection and target-oriented validation \doi{https://doi.org/10.1016/j.envsoft.2017.12.001}} - } } \keyword{datasets} diff --git a/man/geodist.Rd b/man/geodist.Rd index 4820c6d3..8838741e 100644 --- a/man/geodist.Rd +++ b/man/geodist.Rd @@ -118,6 +118,7 @@ dat <- st_as_sf(dat,coords=c("Easting","Northing")) st_crs(dat) <- 26911 trainDat <- dat[dat$altitude==-0.3&lubridate::year(dat$Date)==2010,] predictionDat <- dat[dat$altitude==-0.3&lubridate::year(dat$Date)==2011,] +trainDat$week <- lubridate::week(trainDat$Date) cvfolds <- CreateSpacetimeFolds(trainDat,timevar = "week") dist <- geodist(trainDat,preddata = predictionDat,cvfolds = cvfolds$indexOut,type="time",time_unit="days")