rename_covariates: Rename model covariates

View source: R/utils.R

rename_covariatesR Documentation

Rename model covariates

Description

Rename model covariates

Usage

rename_covariates(run, covariates = NULL)

Arguments

run

pmxploit NONMEM run object.

covariates

named character vector with new covariates names as items names and old covariates names as values.

Value

A NONMEM run object.

Examples

renamed_EXAMPLERUN <- EXAMPLERUN %>%
rename_covariates(covariates = c("Weight" = "WT", "Study" = "STUD"))

EXAMPLERUN %>%
  group_by(STUD) %>%
  plot_continuous_covariates_distributions(type = "boxplot")
renamed_EXAMPLERUN %>%
  group_by(STUD) %>%
  plot_continuous_covariates_distributions(type = "boxplot")

# splitting also works using the original column name
renamed_EXAMPLERUN %>%
  group_by(STUD) %>%
  plot_continuous_covariates_distributions(type = "boxplot")

pnolain/pmxploit documentation built on Jan. 31, 2024, 1:16 p.m.