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

Description Usage Arguments Value Examples

View source: R/cpuefuncs.r

Description

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

Usage

1
countgtzero(invect)

Arguments

invect

vector of values

Value

A single value of zero or the number of zeros

Examples

1
2
3
4
5
x <- rnorm(30,mean=1,sd=1)
countgtzero(x)
cat(30 - countgtzero(x),"out of ",30, " are less than 0  \n")
y <- matrix(x,nrow=6,ncol=5)
apply(y,1,countgtzero)

haddonm/r4cpue documentation built on May 11, 2020, 1:31 a.m.