Skip to content

Instantly share code, notes, and snippets.

@tvladeck
Created November 13, 2017 21:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tvladeck/04ff002784a727dfbf1798a4f3d6c203 to your computer and use it in GitHub Desktop.
Save tvladeck/04ff002784a727dfbf1798a4f3d6c203 to your computer and use it in GitHub Desktop.
library(corrplot)
playstation_data <- matrix(0, nrow = 6, ncol = 5)
rownames(playstation_data) <- c("Connoisseurs", "Connectors", "Rivals", "Indulgers", "Escapers", "Dabblers")
colnames(playstation_data) <- c("Periphery", "Hit", "Mid-Core", "Core", "Occasionals")
playstation_data[1, ] <- c(10, 5, 3, 101, 18)
playstation_data[2, ] <- c(38, 10, 72, 18, 68)
playstation_data[3, ] <- c(10, 110, 22, 28, 15)
playstation_data[4, ] <- c(80, 10, 9, 44, 70)
playstation_data[5, ] <- c(15, 122, 3, 18, 9)
playstation_data[6, ] <- c(101, 24, 13, 3, 10)
col3 <- colorRampPalette(c("red", "white", "blue"))
corrplot(playstation_data - mean(playstation_data), is.corr = F, method = "shade", type = "full", col = col3(100), cl.pos = 'n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment