Creates pmx endpoint object
pmx_endpoint(code, label = "", unit = "", file.code = code, trans = NULL)
character
endpoint code : used to filter observations DVID==code.
character
endpoint label: used to set title and axis labels
character
endpoint unit : used to set title and axis labels
character
endpoint file code : used to set predictions and finegrid
files extensions in case using code parameter is not enough.
list
Transformation parameter not used yet.
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.
# NOT RUN {
## 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)
# }
Run the code above in your browser using DataLab