| COUNTIF {ExcelFunctionsR} | R Documentation | 
Basic COUNTIF function from excel
Description
It acts similiarly to Excel's COUNTIF function. It counts the amount of cells that comply with the given criteria.
Usage
COUNTIF(range, criteria)
Arguments
| range | Specify range for Countif | 
| criteria | Give the criteria to check the range for. | 
Value
In this example we count the amount of setosa in iris dataset. Function will always return numeric class.
Examples
COUNTIF(iris$Species,"setosa")
[Package ExcelFunctionsR version 0.1.4 Index]