Collapse unchanging consecutive observations for a given data frame.
A data.frame. Data to collapse
Boolean. Whether to collapse consecutive NAs.
If the given data frame contains multiple columns, then an observation is only collapsed if all of the columns are unchanging.
data.frame of row size:
0 < N <= nrow(data).
collapse currently only works with REALSXP,
INTSXP, STRSXP, LGLSXP objects. This covers all of the
common atomic R data types, including more complex types
Date. Unfortunately however, this means that
collapse will return an error if a column has a class
1 2 3 4 5
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.