Press "Enter" to skip to content

Rowwise Means in R with the Tidyverse

Sebastian Sauer compares all values across a row:

Sometimes is is neccessary to compute functions, such as mean values, rowwise, ie., summing the values for multiple variables (my_vars) for each observation.

It’s actually pretty easy, and applies to functions other than mean(). Click through for a demonstration.