count2: Like 'uniq -c' in shell to count a vector

View source: R/statistics.R

count2R Documentation

Like uniq -c in shell to count a vector

Description

Like uniq -c in shell to count a vector

Usage

count2(df)

Arguments

df

two columns: first is type, second is number

Value

two columns: first is type, second is number

Examples

count2(data.frame(group = c("A", "A", "B", "C", "C", "A"), value = c(2, 2, 2, 1, 3, 1)))

pcutils documentation built on June 26, 2024, 1:06 a.m.