View source: R/ggInterval_PCA.r
ggInterval_PCA | R Documentation |
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.
ggInterval_PCA(data = NULL,mapping = aes(NULL),plot=TRUE, concepts_group=NULL, poly = FALSE, adjust = TRUE)
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 |
A ggplot object for PC1,PC2,and a interval scores and others.
scores_interval - The interval scores after PCA.
ggplotPCA - a ggplot object with x-axis and y-axis are PC1 and PC2.
others - others are the returns values of princomp.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.