Learn R Programming

compositions (version 2.0-4)

as.data.frame: Convert "compositions" classes to data frames or matrices

Description

Convert a compositional object to a dataframe

Usage

# S3 method for acomp
as.data.frame(x,...)
# S3 method for rcomp
as.data.frame(x,...)
# S3 method for aplus
as.data.frame(x,...)
# S3 method for rplus
as.data.frame(x,...)
# S3 method for rmult
as.data.frame(x,...)
# S3 method for ccomp
as.data.frame(x,...)
# S3 method for rmult
as.matrix(x,...)

Value

a data frame containing the given data, or (for rmult only) as matrix.

Arguments

x

an object to be converted to a dataframe

...

additional arguments are not used

Author

K.Gerald v.d. Boogaart http://www.stat.boogaart.de

Examples

Run this code
data(SimulatedAmounts)
as.data.frame(acomp(sa.groups))
# The central perpose of providing this command is that the following
# works properly:
data.frame(acomp(sa.groups),groups=sa.groups.area)

Run the code above in your browser using DataLab