Learn R Programming

mudata (version 0.1.1)

as.qtag: Convert an object to a qualifier/tag structure

Description

A qualifer/tag structure is an experimental version of a data frame that stores id.vars and measure.vars with the data structure, so it can be handled in a more automatic way. This functionality is experimental.

Usage

as.qtag(df, id.vars = NA, measure.vars = NA, tag.vars = NA,
  quiet = FALSE)

qtag(df, ...)

Arguments

df

A data.frame or similar object

id.vars

Column names of qualifying measure.vars (NA to guess)

measure.vars

Column names containing the values of interest (NA to guess)

tag.vars

Column names of tag values

quiet

Use quiet=TRUE to suppress error messages

...

Passed to/from methods

Value

An object of type qtag, which is essentially the unchanged input with id.vars, measure.vars, and tag.vars information attached.

Examples

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

# }

Run the code above in your browser using DataLab