wide: Convert data to wide format

Description Usage Arguments Value Examples

View source: R/qtag.R

Description

Convert data to wide format

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
wide(x, ...)

## Default S3 method:
wide(x, ...)

## S3 method for class 'qtag.wide'
wide(x, ...)

## S3 method for class 'qtag.long'
wide(x, colvar, fun.aggregate, quiet = FALSE, ...)

Arguments

x

A qtag object or one that can be coerced to one.

...

Passed to other methods

colvar

The column that contains the names of the to-be columns

fun.aggregate

The aggregation function to be used if id.vars other than colvar identify more than one row each.

quiet

Supress warning messages on coersion to a qualifier/tag structure.

Value

A (possibly unchanged) qtag.wide data.frame

Examples

1
2
3
4
5
data(pocmaj)
pocmaj <- as.qtag(pocmaj, id.vars = c("core", "depth"))
pocmajlong <- long(pocmaj)
wide(pocmajlong)
wide(pocmaj)

mudata documentation built on Nov. 17, 2017, 7:30 a.m.