Learn R Programming

rMVP (version 0.99.14.1)

MVP.PCAplot: PCA Plot

Description

PCA Plot

Usage

MVP.PCAplot(PCA, col = NULL, pch = NULL, class = NULL,
  legend.pos = "topright", Ncluster = 3, plot3D = TRUE,
  file = "pdf", dpi = 300, box = FALSE)

Arguments

PCA

Principal component analysis result, 2-column matrix

col

colors for each cluster

pch

Either an integer specifying a symbol or a single character to be used as the default in plotting points. See points for possible values and their interpretation. Note that only integers and single-character strings can be set as a graphics parameter (and not NA nor NULL).

class

the class of all individuals, for example: "breed", "location"...

legend.pos

position of legend. default is "topright"

Ncluster

cluster number

plot3D

(DEPRECATED)if TRUE, plot PC figure in 3D format, it can be only used in windows and mac operation system, "rgl" package should be installed beforehead

file

Character. Options are jpg, pdf, and tiff

dpi

Number. Dots per inch for .jpg and .tiff files

box

Logical value. If TRUE, the border line of Manhattan plot will be added

Value

Output file: MVP.PCA_2D.<type>

Examples

Run this code
# NOT RUN {
geno <- file.path(system.file("extdata", "06_mvp-impute", package = "rMVP"), "mvp.imp")
MVP.Data.PC(TRUE, mvp_prefix=geno, out="myPC")
pca <- attach.big.matrix("myPC.pc.desc")[, 1:3]
MVP.PCAplot(PCA=pca, Ncluster=3, class=NULL, col=c("red", "green", "yellow"), file="jpg", pch=19)
# }

Run the code above in your browser using DataLab