library(ggplot2)
#obj ggplot
plot <- ggplot(iris, aes(x=Sepal.Length, y=Sepal.Width))
plot <- plot + geom_boxplot(aes(group=Species, fill=Species, alpha=0.2))
plot <- plot + geom_point(aes(color=Species, alpha=0.2))
plot <- plot + facet_grid(.~Species)
#mostrar en pantalla
plot
plot <- ggplot(iris, aes(x=Species, y=Petal.Width))
plot <- plot + geom_boxplot(aes(group=Species, fill=Species, alpha=0.2))
plot <- plot + geom_point(aes(color=Species, alpha=0.2))
#mostrar en pantalla
plot
## Coord Paralelas
#install.packages("GGally")
library(GGally)
## Registered S3 method overwritten by 'GGally':
## method from
## +.gg ggplot2
#Crear Objeto
plot2 <- ggparcoord(iris,
columns= c(1:4),
groupColumn = "Species",
showPoints = TRUE
)
plot2
# facetas
plot2 <- plot2 + facet_grid(Species~.)
plot2