Learn R Programming

superml (version 0.5.7)

Counter: Calculate count of values in a list or vector

Description

Handy function to calculate count of values given in a list or vector

Usage

Counter(data, sort = TRUE, decreasing = FALSE)

Value

count of values in a list

Arguments

data

should be a vector or list of input values

sort

a logical value, to sort the result or not

decreasing

a logical value, the order of sorting to be followed

Examples

Run this code
d <- list(c('i','am','bad'),c('you','are','also','bad'))
counts <- Counter(d, sort=TRUE, decreasing=TRUE)

Run the code above in your browser using DataLab