
Display tour path with principal component scores with original axes
Source:R/display-pca.r
display_pca.RdAnimate a 2D tour path on data that has been transformed into principal components, and also show the original variable axes.
Usage
display_pca(
center = TRUE,
axes = "center",
half_range = NULL,
col = "black",
pch = 20,
cex = 1,
pc_coefs = NULL,
edges = NULL,
edges.col = "black",
palette = "Zissou 1",
axislablong = FALSE,
...
)
animate_pca(data, tour_path = grand_tour(), rescale = FALSE, ...)Arguments
- center
if TRUE, centers projected data to (0,0). This pins the center of data cloud and make it easier to focus on the changing shape rather than position.
- axes
position of the axes: center, bottomleft or off
- half_range
half range to use when calculating limits of projected. If not set, defaults to maximum distance from origin to each row of data.
- col
color to use for points, can be a vector or hexcolors or a factor. Defaults to "black".
- pch
shape of the point to be plotted. Defaults to 20.
- cex
size of the point to be plotted. Defaults to 1.
- pc_coefs
coefficients relating the original variables to principal components. This is required.
- edges
A two column integer matrix giving indices of ends of lines.
- edges.col
colour of edges to be plotted, Defaults to "black.
- palette
name of color palette for point colour, used by
hcl.colors, default "Zissou 1"- axislablong
text labels only for the long axes in a projection, default FALSE
- ...
other arguments passed on to
animateanddisplay_slice- data
matrix, or data frame containing numeric columns
- tour_path
tour path generator, defaults to 2d grand tour
- rescale
Default FALSE. If TRUE, rescale all variables to range [0,1].

