compress.data.frame {statnet.common} | R Documentation |
This function "compresses" a data frame, returning unique rows and a tally of the number of times each row is repeated
compress.data.frame(x)
x |
A data frame. |
A list
with two elements:
rows |
Unique rows of |
frequencies |
A vector of the same length as the number or rows, giving the number of times the corresponding row is repeated |
data.frame
data(faithful) head(faithful) lapply(compress.data.frame(faithful),head)