gather.decorated: Gather a Decorated Data Frame

View source: R/gather.R

gather.decoratedR Documentation

Gather a Decorated Data Frame

Description

Gathers a decorated data.frame. I.e. a gather method for class 'decorated'. Invokes tidyr::gather(), converting gathered labels to the guide attribute of key, and converting gathered guides ... if all the same ... to the guide attribute of value. Somewhat experimental!

Usage

## S3 method for class 'decorated'
gather(
  data,
  key = "key",
  value = "value",
  ...,
  na.rm = FALSE,
  convert = FALSE,
  factor_key = FALSE
)

Arguments

data

see gather

key

see gather

value

see gather

...

see gather

na.rm

see gather

convert

see gather

factor_key

see gather

Value

decorated

Examples

library(magrittr)
library(tidyr)
file <- system.file(package = 'yamlet', 'extdata','quinidine.csv')
x <- decorate(file)
x %>% gather('key', 'value', time, interval) %>% decorations


bergsmat/yamlet documentation built on Feb. 18, 2024, 5:50 a.m.