reshape_gather: Reshape dataframe from wide to long

View source: R/reshape_gather.R

reshape_gatherR Documentation

Reshape dataframe from wide to long

Description

This function is an extension of the 'tidyr::gather()' function. It can 'tidyr::gather()' on multiple keys and values

Usage

reshape_gather(x, variable.names, values, id = NULL, separate.pattern = NULL)

Arguments

x

dataframe

variable.names

The variable used for gathering

values

If using more than one variables column then specify name of a new combined column

id

What column is not being reorganized and needs to be preserved. Usually "Subject"

separate.pattern

stuff

Examples

reshape_gather(x, variables = "variable", values = c("value1", "value2"), by = "Subject")

dr-JT/datawrangling documentation built on June 25, 2022, 7:47 p.m.