Below we show 3 versions. The first uses squares, and the next uses circles, the next uses a human icon, and finally, we use emoticons.
Squares
# input data set.seed(123) x <- sample(c("A","B"),100,replace = T) # input parameters - nr * nc should equal length(x) cols <- c("green", "red") nr <- 10 nc <- 10 # create data.frame of positions and colors m <- matrix(cols[factor(x)], nr, nc) DF <- data.frame(row = c(row(m)), col = c(col(m)[, nc:1]), value = c(m), stringsAsFactors = FALSE) # plot squares - modify cex to get different sized squares plot(col ~ row, DF, col = DF$value, pch = 15, cex = 4, asp = 1, xlim = c(0, nr), ylim = c(0, nc), axes = FALSE, xlab = "", ylab = "")

Circles
# plot circles plot(col ~ row, DF, col = DF$value, pch = 20, cex = 6, asp = 1, xlim = c(0, nr), ylim = c(0, nc), axes = FALSE, xlab = "", ylab = "")

png Icons This solution uses the black and white icon of the person we assumed was saved in the current man.png
directory. We color it red and green and use these two versions instead of squares or circles:
# blank graph to insert man icons into plot(col ~ row, DF, col = DF$value, asp = 1, xlim = c(0, nr), ylim = c(0, nc), axes = FALSE, xlab = "", ylab = "", type = "n") library(png) man <- readPNG("man.png") red.man <- man red.man[,,1] <- man[,,4] # fill in red dimension R <- subset(DF, value == "red") with(R, rasterImage(red.man, row-.5, col-.5, row+.5, col+.5, xlim = c(0, nr), ylim = c(0, nc), xlab = "", ylab = "")) green.man <- man green.man[,,2] <- man[,,4] # fill in green dimension G <- subset(DF, value == "green") with(G, rasterImage(green.man, row-.5, col-.5, row+.5, col+.5, xlim = c(0, nr), ylim = c(0, nc), xlab = "", ylab = ""))

Emoticon Icons This solution uses the green emoticon icon and the red frown face icon , which we assumed were saved in the current directory as smiley_green.jpg
and smiley_red.jpg
.
# blank graph to insert man icons into xp <- 1.25 plot(col ~ row, DF, col = DF$value, asp = 1, xlim = c(0, xp * nr), ylim = c(0, xp * nc), axes = FALSE, xlab = "", ylab = "", type = "n") library(jpeg) smiley_green <- readJPEG("smiley_green.jpg") smiley_red <- readJPEG("smiley_red.jpg") R <- subset(transform(DF, row = xp * row, col = xp * col), value == "red") with(R, rasterImage(smiley_red, row - .5, col - .5, row + .5, col + .5, xlim = c(0, xp * nr), ylim = c(0, xp * nc), xlab = "", ylab = "")) G <- subset(transform(DF, row = xp * row, col = xp * col), value == "green") with(G, rasterImage(smiley_green, row - .5, col - .5, row + .5, col + .5, xlim = c(0, xp * nr), ylim = c(0, xp * nc), xlab = "", ylab = ""))

Revised to 10x10 green / red and an added version using the person icon.