countzeros: countzeros used in apply to count the number of zeros in a...

View source: R/rutils.R

countzerosR Documentation

countzeros used in apply to count the number of zeros in a vector

Description

countzeros used in apply to count zeros in a vector

Usage

countzeros(invect)

Arguments

invect

vector of values

Value

A single value of zero or the number of zeros

Examples

## Not run: 
  set.seed(12346)
  x <- trunc(runif(10)*10)
  x
  countzeros(x)  # should be 1

## End(Not run)

haddonm/codeutils documentation built on March 10, 2024, 12:14 p.m.