Skip to contents

ct_spec_example() resolves the local path to an example controlled terminology file.

Usage

ct_spec_example(example)

Arguments

example

A string with either the basename, file name, or relative path to a controlled terminology file bundled with {stdm.oak}, see examples.

Value

The local path to an example file if example is supplied, or a character vector of example file names.

Examples

# Get the local path to controlled terminology example file 01
# Using the basename only:
ct_spec_example("ct-01-cm")
#> [1] "/renv/lib/R-4.3/x86_64-pc-linux-gnu/sdtm.oak/ct/ct-01-cm.csv"

# Using the file name:
ct_spec_example("ct-01-cm.csv")
#> [1] "/renv/lib/R-4.3/x86_64-pc-linux-gnu/sdtm.oak/ct/ct-01-cm.csv"

# Using the relative path:
ct_spec_example("ct/ct-01-cm.csv")
#> [1] "/renv/lib/R-4.3/x86_64-pc-linux-gnu/sdtm.oak/ct/ct-01-cm.csv"

# If no example is provided it returns a vector of possible choices.
ct_spec_example()
#> [1] "ct-01-cm.csv"