gather_data: Gather a data frame

View source: R/utils.R

gather_dataR Documentation

Gather a data frame

Description

Gather a data frame

Usage

gather_data(
  data,
  variable_name = "item",
  numeric_ids = c("^id"),
  use_logical_keys = TRUE,
  use_factor_keys = TRUE,
  unite_columns = NULL,
  separate_columns = NULL,
  use_date_keys = FALSE,
  remove_na = TRUE
)

Arguments

data

a tibble

variable_name

variable column name

numeric_ids

vector of numeric ids

use_logical_keys

if TRUE uses logicals as keys

use_factor_keys

if TRUE uses factors as a key

unite_columns

if not NULL list

  • new_column : new column name

  • column_1 : first column to unite

  • column_2 : second column to unite

  • sep : separator

separate_columns

if not NULL list

  • column : column to separate

  • new_column_1 : new_column 1

  • new_column_2 : new_column 2

  • sep : separator

use_date_keys

if TRUE uses dates as a key

remove_na

removes NA columns

Value

a tibble


abresler/nbastatR documentation built on Nov. 9, 2023, 2:33 p.m.