#' GetAdjustmentSpecFileNames
#'
#' Get the list of adjustment file names in a specific folder. By default the search folder is
#' \code{adjustments} folder installed with package \code{\link{hivEstimatesAccuracyReloaded}}.
#'
#' @param path Path to the folder with adjustment specifications. Optional.
#' Default = \code{\link{system.file}('adjustments', package = 'hivEstimatesAccuracyReloaded')}.
#'
#' @return Character vector of adjustment specification file paths.
#'
#' @examples
#' \dontrun{
#' GetAdjustmentSpecFileNames()
#' }
#'
#' @export
GetAdjustmentSpecFileNames <- function(
path = system.file('adjustments', package = 'hivEstimatesAccuracyReloaded')
) {
adjustmentFileNames <- list.files(path,
pattern = '\\.R$',
full.names = TRUE)
adjustmentNames <- sapply(adjustmentFileNames,
GetListObject,
section = 'Name')
if (anyDuplicated(adjustmentNames) != 0) {
stop('Adjustments have duplicated names')
}
names(adjustmentFileNames) <- adjustmentNames
return(adjustmentFileNames)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.