From 41a56881d8325e13bbd1ca5fad2192330a17507e Mon Sep 17 00:00:00 2001 From: Beaudette Date: Fri, 17 Nov 2023 14:13:34 -0800 Subject: [PATCH] manual issues on win devel check --- R/bootstrapSoilTexture.R | 18 +++++++-------- R/colorQuantiles.R | 6 ++--- R/hzTransitionProbabilities.R | 39 ++++++++++++++++++-------------- R/mixMunsell.R | 10 +++----- man/bootstrapSoilTexture.Rd | 13 +++++------ man/colorQuantiles.Rd | 5 ++-- man/hzTransitionProbabilities.Rd | 23 +++++++++---------- man/mixMunsell.Rd | 10 +++----- 8 files changed, 57 insertions(+), 67 deletions(-) diff --git a/R/bootstrapSoilTexture.R b/R/bootstrapSoilTexture.R index 145ab4d76..e2052da44 100644 --- a/R/bootstrapSoilTexture.R +++ b/R/bootstrapSoilTexture.R @@ -7,24 +7,22 @@ #' #' @author D.E. Beaudette #' -#' @param ssc a \code{data.frame} object with 3 columns: `sand`, `silt`, `clay` and at least three rows of data within the range of 0-100 (percent). NA are automatically removed, but care should be taken to ensure that the sand/silt/clay values add to 100 percent. Simulations are based on these examples. +#' @param ssc a `data.frame` object with 3 columns: 'sand', 'silt', 'clay' and at least three rows of data within the range of 0-100 (percent). NA are automatically removed, but care should be taken to ensure that the sand/silt/clay values add to 100 percent. Simulations are based on these examples. #' -#' @param method type of simulation: `dirichlet` or `normal`. See details. +#' @param method type of simulation: 'dirichlet' or 'normal'. See details. #' #' @param n number of simulated compositions. See details. #' -#' @return a \code{list} containing: +#' @return a `list` containing: #' -#' \itemize{ -#' \item{\code{samples}} - {\code{data.frame} of simulated sand, silt, clay values} -#' \item{\code{mean}} - {compositional mean} -#' \item{\code{var}} - {compositional variance-covariance matrix} -#' \item{\code{D.alpha}} - {(fitted) alpha parameters of the Dirichlet distribution, \code{NULL} when \code{method = 'normal'}} -#' } +#' * `samples` - `data.frame` of simulated sand, silt, clay values +#' * `mean` - compositional mean +#' * `var` - compositional variance-covariance matrix +#' * `D.alpha` - (fitted) alpha parameters of the Dirichlet distribution, `NULL` when `method = 'normal'` #' #' @details Simulations from the multivariate normal distribution will more closely track the marginal distributions of sand, silt, and clay--possibly a better fit for "squished" compositions (TODO elaborate). However, these simulations can result in extreme (unlikely) estimates. #' -#' Simulations from the Dirichlet distribution will usually be a better fit (fewer extreme estimates) but require a fairly large number of records in \code{ssc} (\code{n >= 30}?) for a reliable fit. +#' Simulations from the Dirichlet distribution will usually be a better fit (fewer extreme estimates) but require a fairly large number of records in `ssc` (`n >= 30`?) for a reliable fit. #' #' Additional examples will be added to [this tutorial](http://ncss-tech.github.io/AQP/aqp/soiltexture-vizualization-ideas.html). #' diff --git a/R/colorQuantiles.R b/R/colorQuantiles.R index af98f2ffd..d99a6f40d 100644 --- a/R/colorQuantiles.R +++ b/R/colorQuantiles.R @@ -28,10 +28,8 @@ #' #' @return A List containing the following elements: #' -#' \itemize{ -#' \item{marginal: }{\code{data.frame} containing marginal quantiles in CIELAB (D65), closest Munsell chips, and dE00} -#' \item{L1: }{L1 median CIELAB (D65) values, closest Munsell chip, and dE00} -#' } +#' * `marginal`: `data.frame` containing marginal quantiles in CIELAB (D65), closest Munsell chips, and dE00 +#' * `L1`: L1 median CIELAB (D65) values, closest Munsell chip, and dE00 #' #' @export #' diff --git a/R/hzTransitionProbabilities.R b/R/hzTransitionProbabilities.R index 93c7d4724..121541d31 100644 --- a/R/hzTransitionProbabilities.R +++ b/R/hzTransitionProbabilities.R @@ -1,33 +1,38 @@ # generate transition probability matrix from horizon designations -#' Horizon Transition Probabilities +#' @title Horizon Transition Probabilities #' -#' Functions for creating and working with horizon (sequence) transition +#' @description Functions for creating and working with horizon (sequence) transition #' probability matrices. #' -#' See the following tutorials for some ideas: \describe{ \item{horizon -#' designation -#' TP}{\url{http://ncss-tech.github.io/AQP/aqp/hz-transition-probabilities.html}} -#' \item{soil color -#' TP}{\url{http://ncss-tech.github.io/AQP/aqp/series-color-TP-graph.html}} } +#' See the following tutorials for some ideas: +#' +#' * [horizon designation TP](http://ncss-tech.github.io/AQP/aqp/hz-transition-probabilities.html) +#' * [soil color TP](http://ncss-tech.github.io/AQP/aqp/series-color-TP-graph.html) #' #' @aliases hzTransitionProbabilities genhzTableToAdjMat mostLikelyHzSequence -#' @param x A \code{SoilProfileCollection} object. -#' @param name A horizon level attribute in \code{x} that names horizons. +#' +#' @param x a `SoilProfileCollection` object. +#' +#' @param name A horizon level attribute in `x` that names horizons. +#' #' @param loopTerminalStates should terminal states loop back to themselves? +#' #' This is useful when the transition probability matrix will be used to -#' initialize a \code{markovchain} object. See examples below. -#' @return The function \code{hzTransitionProbabilities} returns a square -#' matrix of transition probabilities. See examples. +#' initialize a `markovchain` object. See examples below. +#' +#' @return A square matrix of transition probabilities. See examples. #' -#' The function \code{genhzTableToAdjMat} returns a square adjacency matrix. +#' The function [genhzTableToAdjMat()] returns a square adjacency matrix. #' See examples. #' -#' The function \code{mostLikelyHzSequence} returns the most likely sequence of -#' horizons, given a \code{markovchain} object initialized from horizon -#' transition probabilities and an initial state, \code{t0}. See examples. +#' The function [mostLikelyHzSequence()] returns the most likely sequence of +#' horizons, given a `markovchain` object initialized from horizon +#' transition probabilities and an initial state, `t0`. See examples. +#' #' @note These functions are still experimental and subject to change. +#' #' @author D.E. Beaudette -#' @seealso \code{\link{generalize.hz}} +#' @seealso [generalize.hz()] #' @keywords manip #' @export #' @examples diff --git a/R/mixMunsell.R b/R/mixMunsell.R index 49a1ec080..8699178dd 100644 --- a/R/mixMunsell.R +++ b/R/mixMunsell.R @@ -148,15 +148,11 @@ #' Marcus, R.T. (1998). The Measurement of Color. In K. Nassau (Ed.), Color for Science, Art, and Technology (pp. 32-96). North-Holland. #' #' +#' * [inspiration / calculations based on the work of Scott Burns](https://arxiv.org/ftp/arxiv/papers/1710/1710.06364.pdf) #' -#' \itemize{ -#' \item{inspiration / calculations based on the work of Scott Burns: }{\url{https://arxiv.org/ftp/arxiv/papers/1710/1710.06364.pdf}} +#' * [related discussion on Stack Overflow](https://stackoverflow.com/questions/10254022/implementing-kubelka-munk-like-krita-to-mix-colours-color-like-paint/29967630#29967630) #' -#' \item{related discussion on Stack Overflow: }{\url{https://stackoverflow.com/questions/10254022/implementing-kubelka-munk-like-krita-to-mix-colours-color-like-paint/29967630#29967630}} -#' -#' \item{spectral library source: }{\url{https://www.munsellcolourscienceforpainters.com/MunsellResources/SpectralReflectancesOf2007MunsellBookOfColorGlossy.txt}} -#' -#' } +#' * [spectral library source](https://www.munsellcolourscienceforpainters.com/MunsellResources/SpectralReflectancesOf2007MunsellBookOfColorGlossy.txt) #' #' #' @details diff --git a/man/bootstrapSoilTexture.Rd b/man/bootstrapSoilTexture.Rd index 8571fde90..99c237850 100644 --- a/man/bootstrapSoilTexture.Rd +++ b/man/bootstrapSoilTexture.Rd @@ -7,20 +7,19 @@ bootstrapSoilTexture(ssc, method = c("dirichlet", "normal"), n = 100) } \arguments{ -\item{ssc}{a \code{data.frame} object with 3 columns: \code{sand}, \code{silt}, \code{clay} and at least three rows of data within the range of 0-100 (percent). NA are automatically removed, but care should be taken to ensure that the sand/silt/clay values add to 100 percent. Simulations are based on these examples.} +\item{ssc}{a \code{data.frame} object with 3 columns: 'sand', 'silt', 'clay' and at least three rows of data within the range of 0-100 (percent). NA are automatically removed, but care should be taken to ensure that the sand/silt/clay values add to 100 percent. Simulations are based on these examples.} -\item{method}{type of simulation: \code{dirichlet} or \code{normal}. See details.} +\item{method}{type of simulation: 'dirichlet' or 'normal'. See details.} \item{n}{number of simulated compositions. See details.} } \value{ a \code{list} containing: - \itemize{ -\item{\code{samples}} - {\code{data.frame} of simulated sand, silt, clay values} -\item{\code{mean}} - {compositional mean} -\item{\code{var}} - {compositional variance-covariance matrix} -\item{\code{D.alpha}} - {(fitted) alpha parameters of the Dirichlet distribution, \code{NULL} when \code{method = 'normal'}} +\item \code{samples} - \code{data.frame} of simulated sand, silt, clay values +\item \code{mean} - compositional mean +\item \code{var} - compositional variance-covariance matrix +\item \code{D.alpha} - (fitted) alpha parameters of the Dirichlet distribution, \code{NULL} when \code{method = 'normal'} } } \description{ diff --git a/man/colorQuantiles.Rd b/man/colorQuantiles.Rd index 2791d5900..84b770728 100644 --- a/man/colorQuantiles.Rd +++ b/man/colorQuantiles.Rd @@ -13,10 +13,9 @@ colorQuantiles(soilColors, p = c(0.05, 0.5, 0.95)) } \value{ A List containing the following elements: - \itemize{ -\item{marginal: }{\code{data.frame} containing marginal quantiles in CIELAB (D65), closest Munsell chips, and dE00} -\item{L1: }{L1 median CIELAB (D65) values, closest Munsell chip, and dE00} +\item \code{marginal}: \code{data.frame} containing marginal quantiles in CIELAB (D65), closest Munsell chips, and dE00 +\item \code{L1}: L1 median CIELAB (D65) values, closest Munsell chip, and dE00 } } \description{ diff --git a/man/hzTransitionProbabilities.Rd b/man/hzTransitionProbabilities.Rd index 56729d90f..e2a0baec9 100644 --- a/man/hzTransitionProbabilities.Rd +++ b/man/hzTransitionProbabilities.Rd @@ -20,11 +20,12 @@ mostLikelyHzSequence(mc, t0, maxIterations = 10) \arguments{ \item{tab}{table, cross-tabulation of original and generalized horizon labels e.g. \code{table(original, genhz)}} -\item{x}{A \code{SoilProfileCollection} object.} +\item{x}{a \code{SoilProfileCollection} object.} \item{name}{A horizon level attribute in \code{x} that names horizons.} \item{loopTerminalStates}{should terminal states loop back to themselves? + This is useful when the transition probability matrix will be used to initialize a \code{markovchain} object. See examples below.} @@ -35,13 +36,12 @@ initialize a \code{markovchain} object. See examples below.} \item{maxIterations}{Maximum number of iterations. Default: \code{10}} } \value{ -The function \code{hzTransitionProbabilities} returns a square -matrix of transition probabilities. See examples. +A square matrix of transition probabilities. See examples. -The function \code{genhzTableToAdjMat} returns a square adjacency matrix. +The function \code{\link[=genhzTableToAdjMat]{genhzTableToAdjMat()}} returns a square adjacency matrix. See examples. -The function \code{mostLikelyHzSequence} returns the most likely sequence of +The function \code{\link[=mostLikelyHzSequence]{mostLikelyHzSequence()}} returns the most likely sequence of horizons, given a \code{markovchain} object initialized from horizon transition probabilities and an initial state, \code{t0}. See examples. } @@ -50,13 +50,12 @@ Convert a cross-tabulation: {original, genhz} to adjacency matrix. Functions for creating and working with horizon (sequence) transition probability matrices. + +See the following tutorials for some ideas: +\itemize{ +\item \href{http://ncss-tech.github.io/AQP/aqp/hz-transition-probabilities.html}{horizon designation TP} +\item \href{http://ncss-tech.github.io/AQP/aqp/series-color-TP-graph.html}{soil color TP} } -\details{ -See the following tutorials for some ideas: \describe{ \item{horizon -designation -TP}{\url{http://ncss-tech.github.io/AQP/aqp/hz-transition-probabilities.html}} -\item{soil color -TP}{\url{http://ncss-tech.github.io/AQP/aqp/series-color-TP-graph.html}} } } \note{ These functions are still experimental and subject to change. @@ -108,7 +107,7 @@ steadyStates(mc) } \seealso{ -\code{\link{generalize.hz}} +\code{\link[=generalize.hz]{generalize.hz()}} } \author{ D.E. Beaudette diff --git a/man/mixMunsell.Rd b/man/mixMunsell.Rd index a83328404..c5a2a1194 100644 --- a/man/mixMunsell.Rd +++ b/man/mixMunsell.Rd @@ -85,14 +85,10 @@ A message is printed when \code{scaledDistance} is larger than 1. } \references{ Marcus, R.T. (1998). The Measurement of Color. In K. Nassau (Ed.), Color for Science, Art, and Technology (pp. 32-96). North-Holland. - \itemize{ -\item{inspiration / calculations based on the work of Scott Burns: }{\url{https://arxiv.org/ftp/arxiv/papers/1710/1710.06364.pdf}} - -\item{related discussion on Stack Overflow: }{\url{https://stackoverflow.com/questions/10254022/implementing-kubelka-munk-like-krita-to-mix-colours-color-like-paint/29967630#29967630}} - -\item{spectral library source: }{\url{https://www.munsellcolourscienceforpainters.com/MunsellResources/SpectralReflectancesOf2007MunsellBookOfColorGlossy.txt}} - +\item \href{https://arxiv.org/ftp/arxiv/papers/1710/1710.06364.pdf}{inspiration / calculations based on the work of Scott Burns} +\item \href{https://stackoverflow.com/questions/10254022/implementing-kubelka-munk-like-krita-to-mix-colours-color-like-paint/29967630#29967630}{related discussion on Stack Overflow} +\item \href{https://www.munsellcolourscienceforpainters.com/MunsellResources/SpectralReflectancesOf2007MunsellBookOfColorGlossy.txt}{spectral library source} } } \seealso{