pmx_endpoint: Creates pmx endpoint object

View source: R/pmxClass.R

pmx_endpointR Documentation

Creates pmx endpoint object

Description

Creates pmx endpoint object

Usage

pmx_endpoint(code, label = "", unit = "", file.code = code, trans = NULL)

Arguments

code

character endpoint code : used to filter observations DVID==code.

label

character endpoint label: used to set title and axis labels

unit

character endpoint unit : used to set title and axis labels

file.code

character endpoint file code : used to set predictions and finegrid
files extensions in case using code parameter is not enough.

trans

list Transformation parameter not used yet.

Details

In case of multiple endpoints, pkpd case for example, we need to pass endpoint to the pmx call. Internally , ggPMX will filter the observations data set to keep only rows satisfying DVID==code. The code is also used to find the right predictions and or fingrid files. ggPMX use the configuration file to fine the path of the predictions file (like the single endpoint case) and then filter the right file using the code parameter.
For example:

  • predictions{code}.txt for mlx16

  • predictions{code}.txt and y{code}_residual for mlx18

For some tricky examples the code parameter is not enough to find the files. In that case the file.code parameter is used to distinguish the endpoint files.

Examples


## Use file.code parameter
pk_pd_path <- file.path(system.file(package = "ggPMX"), "testdata","pk_pd")

WORK_DIR <- file.path(pk_pd_path, "RESULTS")

ep <- pmx_endpoint(
  code="4",
  file.code="2"
)

input_file <- file.path(pk_pd_path, "pk_pd.csv")

ctr <- pmx_mlx(
  config = "standing",
  directory = WORK_DIR,
  input = input_file,
  dv = "dv",
  dvid = "dvid",
  cats = "sex",
  conts = "wt",
  endpoint = ep
 )

## using mlxtran 

ep <- pmx_endpoint(
  code="3",
 file.code="1"
)

mlxtran_file <- file.path(pk_pd_path, "pk_pd.mlxtran")
ctr <- pmx_mlxtran(mlxtran_file,endpoint=ep)


ggPMX documentation built on June 18, 2022, 1:05 a.m.