Learn R Programming

yamlet (version 1.2.1)

gather.decorated: 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 decorated
gather(
  data,
  key = "key",
  value = "value",
  ...,
  na.rm = FALSE,
  convert = FALSE,
  factor_key = FALSE
)

Value

decorated

Arguments

data

see gather

key

see gather

value

see gather

...

see gather

na.rm

see gather

convert

see gather

factor_key

see gather

Examples

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

Run the code above in your browser using DataLab