lump_vars: Lump variables in a table together by summing

View source: R/misc.R

lump_varsR Documentation

Lump variables in a table together by summing

Description

Lump variables in a table together by summing

Usage

lump_vars(
  x = read_dataset(),
  vars = c("Calanus finmarchicus IV", "Calanus finmarchicus V",
    "Calanus finmarchicus VI", "Calanus hyperboreus IV", "Calanus hyperboreus V",
    "Calanus hyperboreus VI", "Calanus glacialis IV", "Calanus glacialis V",
    "Calanus glacialis VI"),
  selector = dplyr::all_of,
  newname = "lumped",
  na.rm = TRUE,
  drop = TRUE
)

Arguments

x

tibble

vars

character, one or more variables to lump

selector

function the function used to select the variables, see tidyselect helpers.

newname

character, the name of the new (lumped) columns

na.rm

logical, if TRUE lump after removing NA values

drop

logical, if TRUE drop the vars

Value

tibble


BigelowLab/calanusthreshold documentation built on May 12, 2022, 5:06 a.m.