AVERAGEIF: Averages Vector Components Based On Condition

Description Usage Arguments Value Author(s) See Also Examples

View source: R/AVERAGEIF.R

Description

Takes two vectors, one being the vector you want to average, 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 take the average of the average vector accordingly.

Usage

1
AVERAGEIF(avg_vector, condition_vector, condition)

Arguments

avg_vector

Vector that you would like to average.

condition_vector

Vector that you would like condition specified for.

condition

Value that will satisfy certain components in condition vector.

Value

Returns average in the average vector based on condition specified for condition vector.

Author(s)

Nick Bultman, njbultman74@gmail.com, July 2021

See Also

mean

Examples

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

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