R/skeleSim.internals.R

Defines functions currentLabel currentScenario

Documented in currentLabel currentScenario

#' @name skeleSim.internals
#' @title SkeleSim internal functions
#' @description SkeleSim internal functions
#'
#' @param params a \linkS4class{skeleSim.params} object.
#'
#' @return
#'   \tabular{ll}{
#'     \code{currentScenario} \tab the parameters for the current scenario.\cr
#'     \code{currentLabel} \tab a character label representing current scenario
#'       and replicate.\cr
#'   }
#'
#' @keywords internals
#'
currentScenario <- function(params) {
  params@scenarios[[params@current.scenario]]
}

#' @rdname skeleSim.internals
#' @keywords internals
#'
currentLabel <- function(params) {
  label <- paste(
    params@title,
    params@current.scenario,
    params@current.replicate,
    sep = "."
  )
  gsub("[[:punct:]]", ".", label)
}

Try the skeleSim package in your browser

Any scripts or data that you put into this service are public.

skeleSim documentation built on Nov. 28, 2017, 1:05 a.m.