R/examplePath.R

Defines functions examplePath

Documented in examplePath

#' Get path to cfDNAPro example folder.
#'
#' cfDNAPro package has sample files in `inst/extdata`
#' directory. This function helps get the path to the data.
#'
#' @param data Name of data set. Such as "groups" or "step6".
#' If `NULL`, the path of extdata folder will be returned.
#' @export
#' @examples
#' examplePath()
#' examplePath("groups_picard")
#' examplePath("step6")
#' @return A string. (i.e. the path.)
#' @export



examplePath <- function(data = NULL) {
    if (is.null(data)) {
        system.file("extdata", package = "cfDNAPro")
    } else {
        system.file("extdata", data, package = "cfDNAPro")
    }
}

Try the cfDNAPro package in your browser

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

cfDNAPro documentation built on Nov. 8, 2020, 6:49 p.m.