Created
October 7, 2019 19:05
-
-
Save monogenea/14c3b479217ad63984e755534e4ffd53 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Name the variables | |
colnames(wine) <- c("Cvs","Alcohol","Malic acid","Ash", | |
"Alcalinity of ash", "Magnesium", | |
"Total phenols", "Flavanoids", | |
"Nonflavanoid phenols", "Proanthocyanins", | |
"Color intensity", "Hue", | |
"OD280/OD315 of diluted wines", "Proline") | |
# The first column corresponds to the classes | |
wineClasses <- factor(wine$Cvs) | |
# Use pairs | |
pairs(wine[,-1], col = wineClasses, upper.panel = NULL, | |
pch = 16, cex = 0.5) | |
legend("topright", bty = "n", legend = c("Cv1","Cv2","Cv3"), | |
pch = 16, col = c("black","red","green"), | |
xpd = T, cex = 2, y.intersp = 0.5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment