Learn R Programming

mixIndependR (version 1.0.0)

counta: Simple count including zero###

Description

Simple count including zero###

Usage

counta(z, y)

Arguments

z

a vector you would like to check

y

an element you would like to count.(Even it is not included in z)

Value

the times that y appears in z

Details

This function counts how many the assigned elements there are in one vector.

Examples

Run this code
# NOT RUN {
z <-rbinom(20,1,0.5)
counta(z,0)

# }

Run the code above in your browser using DataLab