Skip to content

Commit

Permalink
manual issues on win devel check
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanbeaudette committed Nov 17, 2023
1 parent 7410738 commit 41a5688
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 67 deletions.
18 changes: 8 additions & 10 deletions R/bootstrapSoilTexture.R
Original file line number Diff line number Diff line change
Expand Up @@ -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).
#'
Expand Down
6 changes: 2 additions & 4 deletions R/colorQuantiles.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
#'
Expand Down
39 changes: 22 additions & 17 deletions R/hzTransitionProbabilities.R
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 3 additions & 7 deletions R/mixMunsell.R
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 6 additions & 7 deletions man/bootstrapSoilTexture.Rd

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

5 changes: 2 additions & 3 deletions man/colorQuantiles.Rd

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

23 changes: 11 additions & 12 deletions man/hzTransitionProbabilities.Rd

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

10 changes: 3 additions & 7 deletions man/mixMunsell.Rd

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

0 comments on commit 41a5688

Please sign in to comment.