Learn R Programming

fold (version 0.2.6)

simplify.folded: Simplify Folded

Description

Simplify folded. Per each combination of VARIABLE and META, find the minimum left subset of remaining columns necessary for uniquely distinguishing VALUE, setting other columns to NA. Then drop columns that are completely NA and remove duplicate records.

Usage

# S3 method for folded
simplify(x, ...)

Arguments

x

folded

...

passed arguments

Value

folded data.frame

See Also

simplify

Examples

Run this code
# NOT RUN {
library(magrittr)
library(dplyr)
data(events)
x <- events
x %<>% filter(CMT == 2) %>% select(-EVID,-CMT,-AMT)
x %>% fold(USUBJID,TIME, meta = list(DV ~ BLQ, DV ~ LLOQ), simplify = FALSE) %>% simplify
# }

Run the code above in your browser using DataLab