Get path to an example file

Description

The serocalculator package comes bundled with a number of sample files in its inst/extdata directory. This serocalculator_example() function make those sample files easy to access.

Usage

serocalculator_example(file = NULL)

Arguments

file Name of file. If NULL, the example files will be listed.

Details

Adapted from readr::readr_example() following the guidance in https://r-pkgs.org/data.html#sec-data-example-path-helper.

Value

a character string providing the path to the file specified by file, or a vector or available files if file = NULL.

Examples

Code
[1] "example_curve_params.csv" "example_curve_params.rds"
[3] "example_noise_params.csv" "example_noise_params.rds"
[5] "example_pop_data.csv"     "example_pop_data.rds"    
Code
serocalculator_example("example_pop_data.csv")
/home/runner/work/_temp/Library/serocalculator/extdata/example_pop_data.csv