compress.data.frame {statnet.common}R Documentation

"Compress" a data frame

Description

This function "compresses" a data frame, returning unique rows and a tally of the number of times each row is repeated

Usage

compress.data.frame(x)

Arguments

x

A data frame.

Value

A list with two elements:

rows

Unique rows of x

frequencies

A vector of the same length as the number or rows, giving the number of times the corresponding row is repeated

See Also

data.frame

Examples

data(faithful)

head(faithful)

lapply(compress.data.frame(faithful),head)

[Package statnet.common version 3.2.2 Index]