Description Usage Arguments Details Value Author(s)

View source: R/


Clean up and annotate a data frame


1, required.fields = c("x", "y"), signif.digits = 3)



data.frame or AnnotatedDataFrame: the return value of a handler.


Character vector of required fields. Default: c("x","y"). You could set to character(0), for example, if you don't want to force a check that "x" and "y" be present.


Integer, default 3, giving the number of significant digits to which "numeric" (but not "integer") columns should be rounded, using signif(). NULL means to not round at all.


The obj argument should be a return value from a handler, either a data.frame or an annotated data.frame. If a data.frame then an AnnotatedDataFrame is built. Then three special fields in varMetadata are checked: "labelDescription" and "type"

If any is missing then they are built as follows:


labelDescription always exists, but sometimes it has NA entries. In those cases it is set to the name of the variable (rowname of the varMetadata). This is the one that you most likely might want to set yourself.


If not present, then it is calculated from the pData like this: sapply(lapply(pData(obj), is), "[", 1). This will become one of "integer", "factor", "logical", "numeric" or "character", and the front end should know how to render these.

Columns that have type "numeric" (but not "integer") are rounded to the given number of significant digits.

Also, this throws an error if "x" or "y" field is missing




Brad Friedman

AnalysisPageServer documentation built on April 28, 2020, 6:32 p.m.