pmx_endpoint: Creates pmx endpoint object

Description Usage Arguments Details Examples

View source: R/pmxClass.R

Description

Creates pmx endpoint object

Usage

1
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:

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
## 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 Sept. 20, 2021, 5:09 p.m.