This package allows the user to assemble pharmacometrics ready databases from tabulated files following NONMEM convention.
You should follow these steps:
- Install the devtools package if you have not done so far.
install.packages("devtools")
- Load the devtools package.
library("devtools")
- Install the puzzle
install_github("syneoshealth/puzzle")
- Load the puzzle package
library("puzzle")
- Load some data
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))
- Run puzzle()
puzzle(directory=file.path(getwd()),
order=1,
pk=list(data=nm$pk),
dose=list(data=nm$dose),
cov=list(data=nm$cov),
nm=list(name="nonmem.csv"))
The puzzle function will create a NONMEM ready dataset "nonmem.csv" from the R object nm assuming the absorption is going to be modeled using a first order absorption process (i.e. order=1).