puzzle: puzzle

Description Usage Arguments Value Examples

View source: R/puzzle.R

Description

Build pharmacometric data sets from basic tabulated files

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
puzzle(directory = NULL, order, coercion = list(name = NULL, sep =
  ","), optionalcolumns = NULL, pk = list(name = NULL, data = NULL),
  dose = list(name = NULL, data = NULL), cov = list(name = NULL, data =
  NULL), pd = list(name = NULL, data = NULL), extratimes = list(name =
  NULL, data = NULL), nm = list(name = NULL), fillcolumns = NULL,
  nocoercioncolumns = NULL, norepeatcolumns = NULL, initialindex = 0,
  na.strings = "N/A", arrange = "ID,TIME,CMT,desc(EVID)",
  datetimeformat = "%Y-%m-%d %H:%M:%S", timeunits = "hours",
  timezone = Sys.timezone(), ignore = "C", missingvalues = ".",
  parallel = TRUE, verbose = FALSE, username = NULL)

Arguments

directory

path to your directory

order

define the absorption order, can be 0, 1, c(0,1), or c(1,1)

coercion

define name for coercion file

optionalcolumns

define optional columns

pk

define the required file containing the pk information. It can be a .csv or an .xlsx file

dose

define the required file containing the dose information. It can be a .csv, an .xlsx file or an R object.

cov

define the optional file containing the covariate information. It can be a .csv, an .xlsx file or an R object.

pd

define the optional file containing the pd information. It can be a .csv, or a .xlsx file.

extratimes

define the optional file containing the additional times. It can be a .csv, or a .xlsx file.

nm

name of output file generated by puzzle

fillcolumns

define columns to be filled

nocoercioncolumns

define columns to be dropped from the coercion file

norepeatcolumns

define columns not to be repeated

initialindex

define the lower category of categorical covariates

na.strings

define value for na

arrange

define how the columns should be arranged

datetimeformat

define format for date times

timeunits

define time units if needed

timezone

define timezone

ignore

define ignore value

missingvalues

define missing value

parallel

define parallel zero + first order absorption

verbose

define verbose

username

define person performing the assembling

Value

a pharmacometrics ready data set

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
nm = list(pk = list(parent=as.data.frame(puzzle::df_pk_start)),
          dose=as.data.frame(puzzle::df_dose_start), 
          cov=as.data.frame(puzzle::df_cov_start))
puzzle(directory=file.path(tempdir()), 
       order=c(0), 
       pk=list(data=nm$pk), 
       dose=list(data=nm$dose), 
       cov=list(data=nm$cov))

## End(Not run)

puzzle documentation built on Dec. 1, 2019, 1:15 a.m.