mean_score: mean_score() computes the mean for a given set of variables...

View source: R/mean_score.R

mean_scoreR Documentation

mean_score() computes the mean for a given set of variables in a row wise manner

Description

mean_score() computes the mean for a given set of variables in a row wise manner

Usage

mean_score(..., na.rm = TRUE)

Arguments

x, y, z

are set of variables from a data frame (i.e. a selection of numeric columns)

Details

simple wrapper to produce row wise means (default is na.rm=TRUE)

Value

a numeric vector

Examples

library(dplyr)
data_frame %>%
mutate(score =  mean_score(x, z, y))



dacarras/r4sda documentation built on Nov. 9, 2023, 10:17 a.m.