# NOT RUN {
PlotFaces(rbind(1:3,5:3,3:5,5:7))
data(longley)
PlotFaces(longley[1:9,])
set.seed(17)
PlotFaces(matrix(sample(1:1000,128,), 16, 8), main="random faces")
means <- lapply(iris[,-5], tapply, iris$Species, mean)
m <- t(do.call(rbind, means))
m <- cbind(m, matrix(rep(1, 11*3), nrow=3))
# define the colors, first for all faces the same
col <- replicate(3, c("orchid1", "olivedrab", "goldenrod4",
"peachpuff", "darksalmon", "peachpuff3"))
rownames(col) <- c("nose","eyes","hair","face","lips","ears")
# change haircolor individually for each face
col[3, ] <- c("lightgoldenrod", "coral3", "sienna4")
z <- PlotFaces(m, nr=1, nc=3, col=col)
# print the used coding
print(z$info, right=FALSE)
# }
Run the code above in your browser using DataLab