Learn R Programming

mudata (version 0.1.1)

wide: Convert data to wide format

Description

Convert data to wide format

Usage

wide(x, ...)

# S3 method for default wide(x, ...)

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

# S3 method for 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

Run this code
# NOT RUN {
data(pocmaj)
pocmaj <- as.qtag(pocmaj, id.vars = c("core", "depth"))
pocmajlong <- long(pocmaj)
wide(pocmajlong)
wide(pocmaj)

# }

Run the code above in your browser using DataLab