Skip to content

Commit

Permalink
fixes for CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomislav Hengl committed Oct 7, 2021
1 parent 284a576 commit a80dbb2
Show file tree
Hide file tree
Showing 5 changed files with 185 additions and 187 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Imports:
rgdal,
gdalUtils,
raster
Suggests: ranger, forestError, boot, nabor, meteo, geoR, ParamHelpers, mda, psych, spdep, fossil, xgboost, plyr, kernlab, nnet, rjson, spatstat, spatstat.core, maptools, maxlike, RCurl, deepnet, RSAGA, soiltexture, plotKML
Suggests: ranger, forestError, boot, nabor, meteo, geoR, ParamHelpers, mda, psych, spdep, fossil, xgboost, plyr, kernlab, nnet, rjson, spatstat, spatstat.core, maptools, maxlike, RCurl, deepnet, RSAGA, plotKML
RoxygenNote: 7.1.1
SystemRequirements: C++11, GDAL (>= 2.0.1), GEOS (>= 3.4.0),
PROJ (>= 4.8.0)
5 changes: 2 additions & 3 deletions R/TT2tri.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@
#' @export
#'
#' @examples
#' \donttest{
#' library(soiltexture)
#' #library(soiltexture)
#' library(plyr)
#' ## convert textures by hand to sand, silt and clay:
#' TEXMHT <- c("CL","C","SiL","SiL","missing")
#' x <- TT2tri(TEXMHT)
#' x
#' }
TT2tri <- function(TT.class, se.fit=TRUE, TT.im=NULL, soil.var="TEXMHT", levs = c("S", "LS", "SL", "SCL", "SiL", "SiCL", "CL", "L", "Si", "SC", "SiC", "C", "HC")){
TT.class <- as.factor(TT.class)
## check the texture classes:
Expand Down
5 changes: 2 additions & 3 deletions man/TT2tri.Rd

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

150 changes: 75 additions & 75 deletions man/cookfarm.Rd
Original file line number Diff line number Diff line change
@@ -1,75 +1,75 @@
\name{cookfarm}
\docType{data}
\encoding{latin1}
\alias{cookfarm}
\title{The Cook Agronomy Farm data set}
\description{The \href{https://data.nal.usda.gov/dataset/data-field-scale-sensor-network-data-set-monitoring-and-modeling-spatial-and-temporal-variation-soil-moisture-dryland-agricultural-field}{R.J. Cook Agronomy Farm} (\code{cookfarm}) is a Long-Term Agroecosystem Research Site operated by Washington State University, located near Pullman, Washington, USA. Contains spatio-temporal (3D+T) measurements of three soil properties and a number of spatial and temporal regression covariates.}
\usage{data(cookfarm)}
\format{
The \code{cookfarm} data set contains four data frames. The \code{readings} data frame contains measurements of volumetric water content (cubic-m/cubic-m), temperature (degree C) and bulk electrical conductivity (dS/m), measured at 42 locations using 5TE sensors at five standard depths (0.3, 0.6, 0.9, 1.2, 1.5 m) for the period \code{"2011-01-01"} to \code{"2012-12-31"}:
\describe{
\item{\code{SOURCEID}}{factor; unique station ID}
\item{\code{Date}}{date; observation day}
\item{\code{Port*VW}}{numeric; volumetric water content measurements at five depths}
\item{\code{Port*C}}{numeric; soil temperature measurements at five depths}
\item{\code{Port*EC}}{numeric; bulk electrical conductivity measurements at five depths}
}
The \code{profiles} data frame contains soil profile descriptions from 142 sites:
\describe{
\item{\code{SOURCEID}}{factor; unique station ID}
\item{\code{Easting}}{numeric; x coordinate in the local projection system}
\item{\code{Northing}}{numeric; y coordinate in the local projection system}
\item{\code{TAXNUSDA}}{factor; Keys to Soil Taxonomy taxon name e.g. \code{"Caldwell"}}
\item{\code{HZDUSD}}{factor; horizon designation}
\item{\code{UHDICM}}{numeric; upper horizon depth from the surface in cm}
\item{\code{LHDICM}}{numeric; lower horizon depth from the surface in cm}
\item{\code{BLD}}{bulk density in tonnes per cubic-meter}
\item{\code{PHIHOX}}{numeric; pH index measured in water solution}
}
The \code{grids} data frame contains values of regression covariates at 10 m resolution:
\describe{
\item{\code{DEM}}{numeric; Digital Elevation Model}
\item{\code{TWI}}{numeric; SAGA GIS Topographic Wetness Index}
\item{\code{MUSYM}}{factor; soil mapping units e.g. \code{"Thatuna silt loam"}}
\item{\code{NDRE.M}}{numeric; mean value of the Normalized Difference Red Edge Index (time series of 11 RapidEye images)}
\item{\code{NDRE.sd}}{numeric; standard deviation of the Normalized Difference Red Edge Index (time series of 11 RapidEye images)}
\item{\code{Cook_fall_ECa}}{numeric; apparent electrical conductivity image from fall}
\item{\code{Cook_spr_ECa}}{numeric; apparent electrical conductivity image from spring}
\item{\code{X2011}}{factor; cropping system in 2011}
\item{\code{X2012}}{factor; cropping system in 2012}
}
The \code{weather} data frame contains daily temperatures and rainfall from the nearest meteorological station:
\describe{
\item{\code{Date}}{date; observation day}
\item{\code{Precip_wrcc}}{numeric; observed precipitation in mm}
\item{\code{MaxT_wrcc}}{numeric; observed maximum daily temperature in degree C}
\item{\code{MinT_wrccc}}{numeric; observed minimum daily temperature in degree C}
}
}
\note{The farm is 37 ha, stationed in the hilly Palouse region, which receives an annual average of 550 mm of precipitation, primarily as rain and snow in November through May. Soils are deep silt loams formed on loess hills; clay silt loam horizons commonly occur at variable depths. Farming practices at Cook Farm are representative of regional dryland annual cropping systems (direct-seeded cereal grains and legume crops).}
\author{Caley Gasch, Tomislav Hengl and David J. Brown}
\references{
\itemize{
\item Gasch, C.K., Hengl, T., Graeler, B., Meyer, H., Magney, T., Brown, D.J., 2015. Spatio-temporal interpolation of soil water, temperature, and electrical conductivity in 3D+T: the Cook Agronomy Farm data set. Spatial Statistics, 14, pp. 70--90. \doi{10.1016/j.spasta.2015.04.001}
\item Gasch, C. K., Brown, D. J., Campbell, C. S., Cobos, D. R., Brooks, E. S., Chahal, M., & Poggio, M. 2017. A Field-Scale Sensor Network Data Set for Monitoring and Modeling the Spatial and Temporal Variation of Soil Water Content in a Dryland Agricultural Field. Water Resources Research, 53(12), 10878-10887. \doi{10.1002/2017wr021307}
}
}
\examples{
library(rgdal)
data(cookfarm)

## gridded data:
grid10m <- cookfarm$grids
gridded(grid10m) <- ~x+y
proj4string(grid10m) <- CRS(cookfarm$proj4string)
#spplot(grid10m["DEM"], col.regions=SAGA_pal[[1]])

## soil profiles:
profs <- cookfarm$profiles
levels(cookfarm$profiles$HZDUSD)
## Bt horizon:
sel.Bt <- grep("Bt", profs$HZDUSD, ignore.case=FALSE, fixed=FALSE)
profs$Bt <- 0
profs$Bt[sel.Bt] <- 1
}
\keyword{datasets}
\name{cookfarm}
\docType{data}
\encoding{latin1}
\alias{cookfarm}
\title{The Cook Agronomy Farm data set}
\description{The \href{https://data.nal.usda.gov/dataset/data-field-scale-sensor-network-data-set-monitoring-and-modeling-spatial-and-temporal-variation-soil-moisture-dryland-agricultural-field}{R.J. Cook Agronomy Farm} (\code{cookfarm}) is a Long-Term Agroecosystem Research Site operated by Washington State University, located near Pullman, Washington, USA. Contains spatio-temporal (3D+T) measurements of three soil properties and a number of spatial and temporal regression covariates.}
\usage{data(cookfarm)}
\format{
The \code{cookfarm} data set contains four data frames. The \code{readings} data frame contains measurements of volumetric water content (cubic-m/cubic-m), temperature (degree C) and bulk electrical conductivity (dS/m), measured at 42 locations using 5TE sensors at five standard depths (0.3, 0.6, 0.9, 1.2, 1.5 m) for the period \code{"2011-01-01"} to \code{"2012-12-31"}:
\describe{
\item{\code{SOURCEID}}{factor; unique station ID}
\item{\code{Date}}{date; observation day}
\item{\code{Port*VW}}{numeric; volumetric water content measurements at five depths}
\item{\code{Port*C}}{numeric; soil temperature measurements at five depths}
\item{\code{Port*EC}}{numeric; bulk electrical conductivity measurements at five depths}
}
The \code{profiles} data frame contains soil profile descriptions from 142 sites:
\describe{
\item{\code{SOURCEID}}{factor; unique station ID}
\item{\code{Easting}}{numeric; x coordinate in the local projection system}
\item{\code{Northing}}{numeric; y coordinate in the local projection system}
\item{\code{TAXNUSDA}}{factor; Keys to Soil Taxonomy taxon name e.g. \code{"Caldwell"}}
\item{\code{HZDUSD}}{factor; horizon designation}
\item{\code{UHDICM}}{numeric; upper horizon depth from the surface in cm}
\item{\code{LHDICM}}{numeric; lower horizon depth from the surface in cm}
\item{\code{BLD}}{bulk density in tonnes per cubic-meter}
\item{\code{PHIHOX}}{numeric; pH index measured in water solution}
}
The \code{grids} data frame contains values of regression covariates at 10 m resolution:
\describe{
\item{\code{DEM}}{numeric; Digital Elevation Model}
\item{\code{TWI}}{numeric; SAGA GIS Topographic Wetness Index}
\item{\code{MUSYM}}{factor; soil mapping units e.g. \code{"Thatuna silt loam"}}
\item{\code{NDRE.M}}{numeric; mean value of the Normalized Difference Red Edge Index (time series of 11 RapidEye images)}
\item{\code{NDRE.sd}}{numeric; standard deviation of the Normalized Difference Red Edge Index (time series of 11 RapidEye images)}
\item{\code{Cook_fall_ECa}}{numeric; apparent electrical conductivity image from fall}
\item{\code{Cook_spr_ECa}}{numeric; apparent electrical conductivity image from spring}
\item{\code{X2011}}{factor; cropping system in 2011}
\item{\code{X2012}}{factor; cropping system in 2012}
}
The \code{weather} data frame contains daily temperatures and rainfall from the nearest meteorological station:
\describe{
\item{\code{Date}}{date; observation day}
\item{\code{Precip_wrcc}}{numeric; observed precipitation in mm}
\item{\code{MaxT_wrcc}}{numeric; observed maximum daily temperature in degree C}
\item{\code{MinT_wrccc}}{numeric; observed minimum daily temperature in degree C}
}
}
\note{The farm is 37 ha, stationed in the hilly Palouse region, which receives an annual average of 550 mm of precipitation, primarily as rain and snow in November through May. Soils are deep silt loams formed on loess hills; clay silt loam horizons commonly occur at variable depths. Farming practices at Cook Farm are representative of regional dryland annual cropping systems (direct-seeded cereal grains and legume crops).}
\author{Caley Gasch, Tomislav Hengl and David J. Brown}
\references{
\itemize{
\item Gasch, C.K., Hengl, T., Graeler, B., Meyer, H., Magney, T., Brown, D.J., 2015. Spatio-temporal interpolation of soil water, temperature, and electrical conductivity in 3D+T: the Cook Agronomy Farm data set. Spatial Statistics, 14, pp. 70--90. \doi{10.1016/j.spasta.2015.04.001}
\item Gasch, C. K., Brown, D. J., Campbell, C. S., Cobos, D. R., Brooks, E. S., Chahal, M., & Poggio, M. 2017. A Field-Scale Sensor Network Data Set for Monitoring and Modeling the Spatial and Temporal Variation of Soil Water Content in a Dryland Agricultural Field. Water Resources Research, 53(12), 10878-10887. \doi{10.1002/2017wr021307}
}
}
\examples{
library(rgdal)
data(cookfarm)

## gridded data:
grid10m <- cookfarm$grids
gridded(grid10m) <- ~x+y
proj4string(grid10m) <- CRS(cookfarm$proj4string)
#spplot(grid10m["DEM"], col.regions=SAGA_pal[[1]])

## soil profiles:
profs <- cookfarm$profiles
levels(cookfarm$profiles$HZDUSD)
## Bt horizon:
sel.Bt <- grep("Bt", profs$HZDUSD, ignore.case=FALSE, fixed=FALSE)
profs$Bt <- 0
profs$Bt[sel.Bt] <- 1
}
\keyword{datasets}
Loading

0 comments on commit a80dbb2

Please sign in to comment.