Nothing
#' @title Test for a valid `SoilProfileCollection`
#'
#' @description Test for a valid `SoilProfileCollection`
#'
#' @details Test for valid \code{SoilProfileCollection} by checking for slots defined in
#' the class prototype. Likely only used between major versions of `aqp` where
#' internal structure of \code{SoilProfileCollection} has changed. Use
#' \code{checkHzDepthLogic} to check for common errors in horizon depths.
#'
#' @param x a \code{SoilProfileCollection} object
#' @return TRUE or FALSE. Consider using \code{rebuildSPC()} if FALSE.
#' @author D.E. Beaudette
#' @seealso \code{\link{rebuildSPC}}, \code{\link{checkHzDepthLogic}}
#' @export
checkSPC <- function(x) {
# get slot names from prototype
sn <- slotNames(x)
# test for all slots in the prototype
s.test <- sapply(sn, function(i) .hasSlot(x, name=i))
res <- FALSE
# a valid object will have all slots present
if(all(s.test)) {
res <- TRUE
}
return(res)
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.