SUMIF {ExcelFunctionsR} | R Documentation |
Basic SUMIF function from excel
Description
It acts similiarly to Excel's SUMIF function. It sums the values where certain criterias are met.
Usage
SUMIF(range, criteria, sum_range)
Arguments
range |
Which range should it check the criteria against. |
criteria |
what criteria should it check in range |
sum_range |
Which range should it sum |
Value
In this case we are summing Sepal length of species which are virginica. Function will always return numeric class.
Examples
SUMIF(iris$Species,"virginica",iris$Sepal.Length)
[Package ExcelFunctionsR version 0.1.4 Index]