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] )
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.