Learn R Programming

pcutils (version 0.2.8)

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

Description

Like uniq -c in shell to count a vector

Usage

count2(df)

Value

two columns: first is type, second is number

Arguments

df

two columns: first is type, second is number

Examples

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

Run the code above in your browser using DataLab