Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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)

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

Value

count of values in a list

Examples

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

superml

Build Machine Learning Models Like Using Python's Scikit-Learn Library in R

v0.5.3
GPL-3 | file LICENSE
Authors
Manish Saraswat [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.