powered by
Compress a data frame into unique rows and frequency counts.
compressDataFrame(tabdata, freqColName = "freq", .asNumeric = FALSE)
Returns a compressed data frame
An object of class data.frame
data.frame
Column name to contain the frequencies
logical. Whether to cast the frequencies to the numeric type
df <- as.data.frame(matrix(c(sample.int(2, 30, replace=TRUE)), 10, 3)) compressDataFrame(df)
Run the code above in your browser using DataLab