metan (version 1.2.1)

means_by: Means by one or more factors

Description

Computes the mean for all numeric variables of a data frame, grouping by one or more factors.

Usage

means_by(.data, ...)

Arguments

.data

A data frame

...

One or more categorical variables for grouping the data.

Value

An object of class tbl_df with the computed means by each level of the factor(s) declared in ....

Examples

Run this code
# NOT RUN {
library(metan)
means_by(data_ge2, ENV)
means_by(data_ge2, GEN, ENV)
# }

Run the code above in your browser using DataCamp Workspace