Skip to content

Commit

Permalink
Consolidate/update diagnostic_hz/restrictions documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
brownag committed May 28, 2024
1 parent fd2ce0b commit 1b040b8
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 104 deletions.
14 changes: 9 additions & 5 deletions R/Class-SoilProfileCollection.R
Original file line number Diff line number Diff line change
Expand Up @@ -948,10 +948,12 @@ setMethod("site", signature(object = "SoilProfileCollection"),
setGeneric("diagnostic_hz", function(object, ...)
standardGeneric("diagnostic_hz"))

#' Retrieve diagnostic data from SoilProfileCollection
#'
#' @description Get diagnostic feature data from SoilProfileCollection. Result is returned in the same \code{data.frame} class used to initially construct the SoilProfileCollection.
#' Get or Set Diagnostic Horizon data in a SoilProfileCollection
#'
#' @description Diagnostic horizons describe features of the soil relevant to taxonomic classification. A single profile may have multiple diagnostic features or horizons, each of which may be comprised of multiple horizons.
#'
#' - `diagnostic_hz()` (get method): Get diagnostic feature data from a SoilProfileCollection.
#'
#' @param object a SoilProfileCollection
#'
#' @docType methods
Expand All @@ -968,9 +970,11 @@ setMethod(f = 'diagnostic_hz', signature(object = 'SoilProfileCollection'),
setGeneric("restrictions", function(object, ...)
standardGeneric("restrictions"))

#' Retrieve restriction data from SoilProfileCollection
#' Get or Set Restriction data in a SoilProfileCollection
#'
#' @description Get restriction data from SoilProfileCollection. Result is returned in the same \code{data.frame} class used to initially construct the SoilProfileCollection.
#' @description Restrictions describe root-limiting features in the soil. A single profile may have multiple restrictions.
#'
#' - `restrictions()` (get method): Get restriction data from a SoilProfileCollection.
#'
#' @param object a SoilProfileCollection
#' @docType methods
Expand Down
23 changes: 11 additions & 12 deletions R/SoilProfileCollection-setters.R
Original file line number Diff line number Diff line change
Expand Up @@ -629,19 +629,19 @@ setReplaceMethod("horizons", signature(object = "SoilProfileCollection"),
setGeneric('diagnostic_hz<-', function(object, value)
standardGeneric('diagnostic_hz<-'))

#' Add Data to Diagnostic Features Slot
#'
#' @name diagnostic_hz<-
#'
#' @description Diagnostic feature data in an object inheriting from \code{data.frame} can easily be added via merge (LEFT JOIN). There must be one or more same-named columns containing profile ID on the left and right hand side to facilitate the join: \code{diagnostic_hz(spc) <- newdata}
#'
#' @description
#'
#' - `diagnostic_hz<-` (set method): Set diagnostic feature data for a SoilProfileCollection. The profile ID column from `object` (`idname(object)`) must be present in the replacement `value` object.
#'
#' @param object A SoilProfileCollection
#' @param value An object inheriting \code{data.frame}
#' @param value An object inheriting from \code{data.frame}
#'
#' @aliases diagnostic_hz<-,SoilProfileCollection-method
#' @docType methods
#' @export
#' @rdname diagnostic_hz-set
#' @rdname diagnostic_hz
#'
#' @examples
#'
Expand Down Expand Up @@ -716,19 +716,18 @@ setReplaceMethod("diagnostic_hz",
setGeneric('restrictions<-', function(object, value)
standardGeneric('restrictions<-'))

#' Add Data to Restrictions Slot
#'
#' @name restrictions<-
#'
#' @description Restrictions data in an object inheriting from \code{data.frame} can easily be added via merge (LEFT JOIN). There must be one or more same-named profile ID columns on the left and right hand side to facilitate the join: \code{restrictions(spc) <- newdata}.
#'
#' @description
#'
#' - `restrictions<-` (set method): Set restriction data for a SoilProfileCollection. The profile ID column from `object` (`idname(object)`) must be present in the replacement `value` object.
#' @param object A SoilProfileCollection
#' @param value An object inheriting \code{data.frame}
#' @param value An data.frame object containing at least a column with name `idname(object)`
#'
#' @aliases restrictions<-,SoilProfileCollection-method
#' @docType methods
#'
#' @rdname restrictions-set
#' @rdname restrictions
#' @export
#' @examples
#'
Expand Down
40 changes: 0 additions & 40 deletions man/diagnostic_hz-set.Rd

This file was deleted.

44 changes: 40 additions & 4 deletions man/diagnostic_hz.Rd

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

39 changes: 0 additions & 39 deletions man/restrictions-set.Rd

This file was deleted.

43 changes: 39 additions & 4 deletions man/restrictions.Rd

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

0 comments on commit 1b040b8

Please sign in to comment.