c_across.: Combine values from multiple columns

Description Usage Arguments Examples

View source: R/c_across.R

Description

c_across.() works inside of mutate_rowwise.(). It uses tidyselect so you can easily select multiple variables.

Usage

1

Arguments

cols

Columns to transform.

Examples

1
2
3
4
test_df <- data.table(x = runif(6), y = runif(6), z = runif(6))

test_df %>%
  mutate_rowwise.(row_mean = mean(c_across.(x:z)))

mtfairbanks/gdt documentation built on May 4, 2021, 9:44 a.m.