powered by
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.
select_distinct(df, .by)
df with less columns
df
a dataframe
optional grouping columns
tm = edc_example_ae() tm$ae %>% names tm$ae %>% select_distinct() %>% names tm$ae %>% select_distinct(.by=subjid) %>% names
Run the code above in your browser using DataLab