count {container}R Documentation

Count Elements

Description

Count the number of occurences of some element.

Usage

count(x, elem)

## S3 method for class 'Container'
count(x, elem)

## S3 method for class 'Set'
count(x, elem)

Arguments

x

any R object.

elem

element to counted.

Value

integer number of how many times elem occurs in the object.

Examples


co = container("a", "b", "a", mean, mean)
count(co, "a")
count(co, mean)
count(co, "c")

[Package container version 1.0.4 Index]