dudi.pca
or COA dudi.coa
.
It accepts a factor so that groups of points can be coloured.
It can also be used for graphing genes, and will only label n genes at the ends of the axis.
graph1D(dfx, classvec=NULL,ax = 1, hor=FALSE, s.nam=row.names(dfx), n=NULL, scaled=TRUE, col="red", width=NULL, ...)
vector
, matrix
, or data.frame
, which contains a column
with axis coordinatesmatrix
, or data.frame
to be plotted.
The default is 1.between.graph
a<-rnorm(25)
graph1D(a, s.nam=letters[1:25])
graph1D(a, s.nam=letters[1:25], col="blue", pch=19, n=3)
data(khan)
if (require(ade4, quiet = TRUE)) {
khan.coa<-dudi.coa(khan$train, scan=FALSE, nf=2)
}
graph1D(khan.coa$co, ax=1)
Run the code above in your browser using DataLab