grpplot | R Documentation |
Plot matrix-like object by group
grpplot(x, y, plot = "pairs", ...)
x |
A matrix or data frame to be plotted. |
y |
A factor or vector giving group information of columns of |
plot |
One of plot types: |
... |
Further arguments. See corresponding entry in
|
An object of class "trellis"
.
Wanchang Lin
panel.elli.1
, pcaplot
,
pca_plot_wrap
, lda_plot_wrap
,
pls_plot_wrap
.
data(iris)
grpplot(iris[,1:4], iris[,5],plot="strip", main="IRIS DATA")
grpplot(iris[,1:4], iris[,5],plot="box", main="IRIS DATA")
grpplot(iris[,1:4], iris[,5],plot="density", main="IRIS DATA")
grpplot(iris[,1:4], iris[,5],plot="pairs",main="IRIS DATA",ep=2)
## returns an object of class "trellis".
tmp <- grpplot(iris[,c(2,1)], iris[,5],main="IRIS DATA",ep=2)
tmp
## change symbol's color, type and size
grpplot(iris[,c(2,1)], iris[,5],main="IRIS DATA", cex=1.5,
auto.key=list(space="right", col=c("black","blue","red")),
par.settings = list(superpose.symbol = list(col=c("black","blue","red"),
pch=c(1:3))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.