https://github.com/cran/robCompositions
Tip revision: 744e252d9a1ee4b0d8263a5a0da37e1f5255129c authored by Matthias Templ on 08 November 2018, 13:00:03 UTC
version 2.0.9
version 2.0.9
Tip revision: 744e252
plot.pcaCoDa.R
#' Plot method
#'
#' Provides a screeplot for (robust) compositional principal components analysis.
#'
#'
#' @param x object of class \sQuote{pcaCoDa}
#' @param y ...
#' @param \dots ...
#' @return The robust compositional screeplot.
#' @author M. Templ, K. Hron
#' @seealso \code{\link{pcaCoDa}}, \code{\link{biplot.pcaCoDa}}
#' @references Filzmoser, P., Hron, K., Reimann, C. (2009) Principal Component Analysis for
#' Compositional Data with Outliers. \emph{Environmetrics}, \bold{20} (6),
#' 621--632.
#' @keywords aplot
#' @export
#' @method plot pcaCoDa
#' @examples
#'
#' data(coffee)
#' p1 <- pcaCoDa(coffee[,-1])
#' plot(p1)
#' plot(p1, type="lines")
#'
#'
plot.pcaCoDa <- function(x, y, ...){
beschx <- if(x$method == "robust") "PC1 (clr-robust)" else "PC1 (clr-standard)"
beschy <- if(x$method == "robust") "PC2 (clr-robust)" else "PC2 (clr-standard)"
screeplot(x$princompOutputClr, main="", ...)
}