get_data_path: Get path to data file

View source: R/get-path-from-object.R

get_data_pathR Documentation

Get path to data file

Description

Helper to extract the path to the input data from a bbi object.

Usage

get_data_path(.bbi_object, .check_exists = TRUE, ...)

## S3 method for class 'bbi_model'
get_data_path(.bbi_object, .check_exists = TRUE, ...)

## S3 method for class 'bbi_nonmem_model'
get_data_path(.bbi_object, .check_exists = TRUE, ...)

## S3 method for class 'bbi_nonmem_summary'
get_data_path(.bbi_object, .check_exists = TRUE, ...)

## S3 method for class 'bbi_log_df'
get_data_path(.bbi_object, .check_exists = TRUE, ...)

Arguments

.bbi_object

The object to query. Could be a ⁠bbi_{.model_type}_model⁠ object, ⁠bbi_{.model_type}_summary⁠ object, or a tibble of class bbi_log_df.

.check_exists

If TRUE, the default, will throw an error if the file does not exist

...

Arguments passed through to methods. (Currently none, but may have some modifier arguments other model types in the future.)

Value

Absolute path to input data file

Notes on NONMEM model extensions

Before executing the model, bbi first copies the control stream file to a subdirectory. Whether a relative path to the data file in the control stream is adjusted for this change in directory depends on the control stream's file extension:

  • For a model with a .mod extension, bbi automatically adjusts a relative data path to make it relative to the execution directory, following the behavior of PsN.

  • For a model with a .ctl extension, bbi does not adjust the data path. A relative data path in the control stream must be specified one level deeper (i.e. with an additional ⁠../⁠) to account for the model being executed in a subdirectory.

See Also

get_model_id() get_path_from_object() build_path_from_model()

Other NONMEM model extensions: submit_model(), submit_models()


metrumresearchgroup/rbabylon documentation built on April 21, 2024, 3:26 a.m.