-
-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathautoplot.pca_common.Rd
64 lines (54 loc) · 1.92 KB
/
autoplot.pca_common.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fortify_stats.R
\name{autoplot.pca_common}
\alias{autoplot.pca_common}
\alias{autoplot.prcomp}
\alias{autoplot.princomp}
\alias{autoplot.factanal}
\title{Autoplot PCA-likes}
\usage{
\method{autoplot}{pca_common}(
object,
data = NULL,
scale = 1,
x = 1,
y = 2,
variance_percentage = TRUE,
...
)
}
\arguments{
\item{object}{PCA-like instance}
\item{data}{Joined to fitting result if provided.}
\item{scale}{scaling parameter, disabled by 0}
\item{x}{principal component number used in x axis}
\item{y}{principal component number used in y axis}
\item{variance_percentage}{show the variance explained by the principal component?}
\item{...}{other arguments passed to [ggbiplot()]}
}
\description{
Autoplot PCA-likes
}
\examples{
autoplot(stats::prcomp(iris[-5]))
autoplot(stats::prcomp(iris[-5]), data = iris)
autoplot(stats::prcomp(iris[-5]), data = iris, colour = 'Species')
autoplot(stats::prcomp(iris[-5]), label = TRUE, loadings = TRUE, loadings.label = TRUE)
autoplot(stats::prcomp(iris[-5]), frame = TRUE)
autoplot(stats::prcomp(iris[-5]), data = iris, frame = TRUE,
frame.colour = 'Species')
autoplot(stats::prcomp(iris[-5]), data = iris, frame = TRUE,
frame.type = 't', frame.colour = 'Species')
autoplot(stats::princomp(iris[-5]))
autoplot(stats::princomp(iris[-5]), data = iris)
autoplot(stats::princomp(iris[-5]), data = iris, colour = 'Species')
autoplot(stats::princomp(iris[-5]), label = TRUE, loadings = TRUE, loadings.label = TRUE)
#Plot PC 2 and 3
autoplot(stats::princomp(iris[-5]), x = 2, y = 3)
#Don't show the variance explained
autoplot(stats::princomp(iris[-5]), variance_percentage = FALSE)
d.factanal <- stats::factanal(state.x77, factors = 3, scores = 'regression')
autoplot(d.factanal)
autoplot(d.factanal, data = state.x77, colour = 'Income')
autoplot(d.factanal, label = TRUE, loadings = TRUE, loadings.label = TRUE)
}