remove_unused_columns: remove_unused_columns

View source: R/functions_wrapper.R

remove_unused_columnsR Documentation

remove_unused_columns

Description

Remove all columns in the dataset that are not used by the model including dropped columns

Warnings Currently columns not needed to give a prediction, but used by other expressions in the model are kept. This will change in the future.

Usage

remove_unused_columns(model)

Arguments

model

(Model) Pharmpy model

Value

(Model) Updated Pharmpy model

See Also

drop_columns : Drop columns from the dataset

Examples

## Not run: 
model <- load_example_model("pheno")
model <- remove_unused_columns(model)
vector(model$dataset$columns)

## End(Not run)

pharmr documentation built on May 28, 2026, 5:08 p.m.