Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set.seed(1)
- mdat <- data.frame(x = rnorm(100), y = rnorm(100), z = rnorm(100),
- cluster = factor(sample(5, 100, TRUE)))
- library(ggplot2)
- library(gtools)
- library(plyr)
- cols <- c("x", "y", "z")
- allS <- adply(combinations(3, 2, cols), 1, function(r)
- data.frame(cluster = mdat$cluster,
- var.x = r[1],
- x = mdat[[r[1]]],
- var.y = r[2],
- y = mdat[[r[2]]]))
- sc <- ggplot(allS, aes(x = x, y = y, color = cluster)) + geom_point() +
- facet_grid(var.x ~ var.y)
- library(lattice)
- sc3d <- cloud(z ~ x + y, data = mdat, groups = cluster)
- library(gridExtra); library(lattice); library(ggplot2)
- grid.arrange(xyplot(1~1), qplot(1,1))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement