Learn R Programming

partition (version 0.2.2)

scaled_mean: Average and scale rows in a data.frame

Description

scaled_mean() calculates scaled row means for a dataframe.

Usage

scaled_mean(.x, method = c("r", "c"))

Value

a numeric vector

Arguments

.x

a data.frame

method

The method source: both the pure R and C++ versions are efficient

Examples

Run this code
library(dplyr)
iris %>%
  select_if(is.numeric) %>%
  scaled_mean()

Run the code above in your browser using DataLab