ggInterval_PCA {ggESDA}R Documentation

Vertice-PCA for interval data

Description

ggInterval_PCA performs a principal components analysis on the given numeric interval data and returns the results like princomp, ggplot object and a interval scores.

Usage

ggInterval_PCA(data = NULL,mapping = aes(NULL),plot=TRUE,
                      concepts_group=NULL, poly = FALSE, adjust = TRUE)

Arguments

data

A ggESDA object. It can also be either RSDA object or classical data frame, which will be automatically convert to ggESDA data.

mapping

Set of aesthetic mappings created by aes() or aes_(). If specified and inherit. aes = TRUE (the default), it is combined with the default mapping at the top level of the plot. You must supply mapping if there is no plot mapping. It is the same as the mapping of ggplot2.

plot

Boolean variable,Auto plot (if TRUE).It can also plot by its inner object

concepts_group

color with each group of concept

poly

if plot a poly result

adjust

adjust sign of the principal component

Value

A ggplot object for PC1,PC2,and a interval scores and others.

Examples

ggInterval_PCA(iris)

mydata2<-ggESDA::Cardiological
ggInterval_PCA(mydata2,aes(col="red",alpha=0.2))

d<-mapply(c(10,20,40,80,160),c(20,40,80,160,320),FUN=runif,n=1000)
d<-data.frame(qq=matrix(d,ncol=4))
ggInterval_PCA(d)

myIris<-classic2sym(iris,"Species")
p<-ggInterval_PCA(myIris,plot=FALSE)
p$ggplotPCA
p$scores_interval


[Package ggESDA version 0.2.0 Index]