Description Usage Arguments Value Examples
countgtzero used in apply to count the number of zeros in a vector
1 | countgtzero(invect)
|
invect |
vector of values |
A single value of zero or the number of zeros
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.