Description Usage Arguments See Also Examples

Count the number of times the values in the vector meet the specified conditions.

1 | ```
count(x)
``` |

`x` |
Vector and condition to count. |

length, nchar

1 2 3 4 5 6 7 8 9 10 11 12 13 | ```
set.seed(1)
x <- rnorm(100)
# Count the number of times the values in x are greater then 0
count( x>0 )
# Count the number of times the values in x are within the 95% confidence interval
count( (x>-1.96) & (x<1.96) )
# Or could have used
count( abs(x)<1.96 )
# Count the number of times the values in x are the same as the first element
count( x==x[1] )
``` |

Rlab documentation built on May 30, 2017, 3:26 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.