knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

puzzle

The goal of puzzle is assembling pharmacometric ready data sets from tabulated files.

Installation

You can install the released version of puzzle from CRAN with:

install.packages("puzzle")

or download the development version from Github:

devtools::install_github("syneoshealth/puzzle")

Example

This is a basic example which shows you how to solve a common problem:

library(puzzle)
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))
df = puzzle(directory=file.path(tempdir()),
        order=c(0),
        pk=list(data=nm$pk),
        dose=list(data=nm$dose),
        cov=list(data=nm$cov))

A portion of the pharmacometrics ready data set obtained with the code showed above is presented below:

library(knitr)
library(kableExtra)
library(tidyverse)
df %>%
  dplyr::select(1:4,8:15) %>% 
  kable() %>%
  kable_styling(bootstrap_options = c("striped", "hover", "condensed", "responsive"))


syneoshealth/puzzle documentation built on Dec. 4, 2019, 11:42 p.m.