Learn R Programming

RFmarkerDetector (version 1.0.1)

plot.pca.scores: PCA Scores plot This function creates a plot that graphically projects the original samples onto the subspce spanned by the first two principal components

Description

PCA Scores plot This function creates a plot that graphically projects the original samples onto the subspce spanned by the first two principal components

Usage

"plot"(pca_obj, dataset, xrange, yrange)

Arguments

pca_obj
an object of class pca
dataset
a n x p dataframe representing the dataset used to create the pca object
xrange
a vector of two elements indicating the range of values along the x-axis in which eventually it will be specified the name of the samples
yrange
a vector of two elements indicating the range of values along the y-axis in which eventually it will be specified the name of the samples

Details

The Scores plot is used for interpreting relations among the observations

Examples

Run this code
## data(cachexiaData)
## pca_obj <- pca(cachexiaData, autoscale = TRUE, exclude = TRUE) 
## plot.pca.scores(pca_obj, cachexiaData)

Run the code above in your browser using DataLab