Learn R Programming

provenance (version 0.6)

as.data.frame.compositional: create a data.frame object

Description

Convert an object of class compositional to a data.frame for use in the robCompositions package

Usage

## S3 method for class 'compositional':
as.data.frame(x, ...)

Arguments

x
an object of class compositional
...
optional arguments to be passed on to the generic function

Value

  • a data.frame

Examples

Run this code
data(Namib)
qfl <- ternary(Namib$PT,c('Q'),c('KF','P'),c('Lm','Lv','Ls'))
plot(qfl,type="QFL.dickinson")
qfl.frame <- as.data.frame(qfl)
## uncomment the next two lines to plot an error
## ellipse using the robCompositions package:
# library(robCompositions)
# pca <- pcaCoDa(qfl.frame)
# plot(pca,xlabs=rownames(qfl.frame))

Run the code above in your browser using DataLab