set_dataset: set_dataset

View source: R/functions_wrapper.R

set_datasetR Documentation

set_dataset

Description

Load the dataset given datainfo

Usage

set_dataset(model, path_or_df, datatype = NULL)

Arguments

model

(Model) Pharmpy model

path_or_df

(str or data.frame) Dataset path or dataframe

datatype

(str (optional)) Type of dataset (optional)

Value

(Model) Pharmpy model with new dataset and updated datainfo

Examples

## Not run: 
model <- load_example_model("pheno")
model <- unload_dataset(model)
dataset_path <- model$datainfo$path
model$dataset is NULL
model <- set_dataset(model, dataset_path, datatype='nonmem')
model$dataset

## End(Not run)


pharmpy/pharmr documentation built on Feb. 15, 2025, 3:22 a.m.