pk_define {apmx} | R Documentation |
Create definition file from published dataset
Description
Definition file table can be read into a template word document (.docx) or blank document if desired. Definitions are sourced from a variable list stored separately on your server. Please refer to apmx::variable_list_export() for a standard copy of the variable list.
Usage
pk_define(
df,
file = NULL,
project,
data,
variable.list,
template = NULL,
font = "Times New Roman",
size = 9,
na = -999
)
Arguments
df |
apmx analysis dataset |
file |
optional filepath for defintion file (.docx file) |
project |
project name |
data |
dataset name |
variable.list |
reference dataframe for variable definitions |
template |
optional filepath for definition file template (.docx file) |
font |
font for table contents |
size |
font size for table contents |
na |
value used for missing or na numeric covariates |
Value
dataset definition file
Examples
## Simple ex domain with 1 subject and 1 dose
ex <- data.frame(STUDYID = "ABC101",
USUBJID = "ABC101-001",
EXSTDTC = "2000-01-01 10:00:00",
EXSTDY = 1,
EXTPTNUM = 0,
EXDOSE = 100,
CMT = 1,
EXTRT = "ABC",
EXDOSU = "mg",
VISIT = "Day 1",
EXTPT = "Dose",
EXDOSFRQ = "Once",
EXROUTE = "Oral")
## Simple pc domain with 1 subject and 3 observations
pc <- data.frame(USUBJID = "ABC101-001",
PCDTC = c("2000-01-01 09:40:00",
"2000-01-01 10:29:00",
"2000-01-01 12:05:00"),
PCDY = 1,
PCTPTNUM = c(0, ##Units of hours
0.021,
0.083),
PCSTRESN = c(NA,
469,
870),
PCLLOQ = 25,
CMT = 2,
VISIT = "Day 1",
PCTPT = c("Pre-dose",
"30-min post-dose",
"2-hr post-dose"),
PCTEST = "ABC",
PCSTRESU = "ug/mL")
## Create apmx dataset with pk_build()
df <- pk_build(ex, pc)
## Create variable definitions with variable_list_create()
vl <- variable_list_create()
## Create definition file
pk_define(df, variable.list = vl)
[Package apmx version 1.1.1 Index]