build_path_from_model: Build path to output file

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

build_path_from_modelR Documentation

Build path to output file

Description

Builds the absolute path to a file in the output directory from components of the ⁠bbi_{.model_type}_model⁠ object

Usage

build_path_from_model(.mod, .suffix, ...)

## S3 method for class 'bbi_model'
build_path_from_model(.mod, .suffix, ...)

Arguments

.mod

Model to use, either a ⁠bbi_{.model_type}_model⁠ or ⁠bbi_{.model_type}_summary⁠ object.

.suffix

Character vector to append the end of the absolute model path. Will be appended as is so, if passing a file extension, be sure to included the leading ".". See examples.

...

arguments passed through to methods. (Currently none.)

Value

Returns an absolute path to ⁠{.mod$absolute_model_path}/{get_model_id(.mod)}{.suffix}⁠. Does not check whether the file exists.

Examples

.mod <- read_model(
  system.file("model", "nonmem", "basic", "1", package = "bbr")
)
build_path_from_model(.mod, ".lst")
build_path_from_model(.mod, "-standata.R")


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