SUMIF: Sums Vector Components Based On Condition

Description Usage Arguments Value Author(s) See Also Examples

View source: R/SUMIF.R

Description

Takes two vectors, one being the vector you want to sum, and the other being the vector you want create a condition for. Then, specify the condition that should be used to satisfy the condition vector and it will aggregate the sum vector accordingly.

Usage

1
SUMIF(sum_vector, condition_vector, condition)

Arguments

sum_vector

Vector that you would like to sum.

condition_vector

Vector that you would like condition specified for.

condition

Value that will satisfy certain components in condition vector.

Value

Returns summed value in the sum vector based on condition specified for condition vector.

Author(s)

Nick Bultman, njbultman74@gmail.com, September 2020

See Also

sum

Examples

1
2
SUMIF(iris$Sepal.Length, iris$Species, "virginica")
SUMIF(c(1, 2, 3), c(3, 1, 3), 3)

njbultman/xlsxFunctions documentation built on Aug. 8, 2021, 3:14 p.m.