Learn R Programming

metaplot (version 0.8.4)

unpack.data.frame: Express Scalar Column Attributes as Column Metadata

Description

Expresses scalar column attributes as column metadata (row values). Column with name meta is created to hold names of attributes, if any. A transposed table (sorted by attribute name) of scalar column attribute values (coerced to character) is bound to the existing data.frame (the attributes themselves are removed from columns). Bind position is controlled by position such that the intersection of new rows and column occurs in the corresponding corner, numbered clockwise from top-left. Resulting column classes are character. It is an error if meta is already in names(x).

Usage

# S3 method for data.frame
unpack(
  x,
  meta = getOption("meta", "meta"),
  position = 1L,
  ignore = c("class", "levels"),
  ...
)

Value

data.frame

data.frame with all columns of class character

Arguments

x

data.frame

meta

column in result giving names of attributes

position

1 (top-left), 2 (top-right), 3 (bottom-right), or 4 (bottom-left)

ignore

character: attributes to ignore

...

ignored arguments

See Also

Other pack: pack.data.frame(), pack(), unpack()

Other methods: axislabel.data.frame(), boxplot.data.frame(), categorical.data.frame(), corsplom.data.frame(), densplot.data.frame(), metaplot.data.frame(), pack.data.frame(), plot.metaplot_gtable(), print.metaplot_gtable(), scatter.data.frame()