Skip to contents

Returns the path to the directory storing the example files shipped with metabodecon.

Deprecated since metabodecon v1.2.0. Please use datadir() instead. See examples below for usage.

[Deprecated]

Usage

get_data_dir(dataset_name = c("", "blood", "test", "urine"), warn = TRUE)

Arguments

dataset_name

Either "", "test", "blood" or "urine".

warn

Whether to print a warning message when the example folders do not yet exist, i.e. download_example_datasets() has not been called yet.

Value

Path to the directory storing the example files.

Examples

x <- get_data_dir("urine")                     # Deprecated
#> Warning: /tmp/RtmpuYVEs7/metabodecon/data does not exist. Please call `download_example_datasets()` first.
#> Warning: /tmp/RtmpuYVEs7/metabodecon/data/example_datasets/bruker/urine does not exist. Please call `download_example_datasets(extract = TRUE)` first.
y <- datadir("example_datasets/bruker/urine")  # Preferred
#> Warning: /tmp/RtmpuYVEs7/metabodecon/data/example_datasets/bruker/urine does not exist. Please call `download_example_datasets()` first.
cat(x, y, sep = "\n")
#> /tmp/RtmpuYVEs7/metabodecon/data/example_datasets/bruker/urine
#> /tmp/RtmpuYVEs7/metabodecon/data/example_datasets/bruker/urine