select_distinct {EDCimport} | R Documentation |
Select only distinct columns
Description
Select all columns that has only one level for a given grouping scope. Useful when dealing with mixed datasets containing both long data and repeated short data.
Usage
select_distinct(df, .by)
Arguments
df |
a dataframe |
.by |
optional grouping columns |
Value
df
with less columns
Examples
tm = edc_example_ae()
tm$ae %>% names
tm$ae %>% select_distinct() %>% names
tm$ae %>% select_distinct(.by=subjid) %>% names
[Package EDCimport version 0.5.2 Index]