BIOM.utils (version 0.9)

BIOM Display: Display BIOM data in full or part

Description

Nicely print or summarize an object of class biom. A summary omits printing the data table.

Usage

"str"(object, ...)
"summary"(object, ...)
"print"(x, ...)
"head"(x, n=5, p=n, ...)
"tail"(x, n=5, p=n, ...)

Arguments

x
an object (biom)
object
an object (biom)
n
number of rows (single integer)
p
number of columns (single integer)
...
further arguments to default method (str() only)

Value

A matrix for head() and tail(). See note below.For the others, nothing useful.

Details

BIOM (Biological Observation Matrix) is a simple prescription for storing an annotated table of data. It may be described as a format, standard, or data structure.

The JSON (JavaScript Object Notation) standard for expressing general data objects as text is employed to define BIOM. Therefore the native form of BIOM data is structured text, conforming to the JSON specification in general and the BIOM specification in particular. Familiarity with BIOM is assumed here.

The S3 class biom and its methods facilitate analyses by expressing BIOM data as objects in the R environment. The functions above apply to an R object that is already of class biom.

print() and summary() show the contents of the object, with the difference that the latter omits printing the BIOM data table. The former always prints it in expanded (non-sparse) form.

str() shows the raw R structure of its argument using the default str() with pleasing options.

head() and tail() return the data table's initial or final few rows and columns.

References

BIOM format JSON

See Also

biom, dim.biom as.matrix.biom

Examples

Run this code
##  one toy example, one real example:
xx <- biom (dmat, quiet=TRUE)
yy <- biom (li4)

summary (xx)
print (xx)
head (xx)
tail (xx)
tail (xx, n=10, p=3)

tail (yy)
tail (yy, n=15)

##  biom class is just a list:
str (yy)

Run the code above in your browser using DataLab