-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanalysis.R
More file actions
22 lines (19 loc) · 1016 Bytes
/
analysis.R
File metadata and controls
22 lines (19 loc) · 1016 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
library("GGally")
library("rstudioapi")
setwd(dirname(getActiveDocumentContext()$path))
data <- read.csv("data.csv")
data <- data[c(2:6)]
png(paste("analysis.png", sep = ""), width=2000, height=1304, units="px")
ggpairs(data=data,
mapping = ggplot2::aes(color = color,alpha=0.5),
title = "Analysis of n=713 colored chocolate peanuts from four different brands")+
scale_fill_manual(values=c('blue','brown','green','orange','red','yellow')) +
scale_colour_manual(values=c('blue','brown','green','orange','red','yellow')) +
theme(legend.position = "none",
panel.grid.major = element_blank(),
axis.text = element_text(colour = "black", size = 18),
strip.background = element_rect(fill = "#999999"),
strip.text = element_text(colour = "white", size = 18, face = "bold"),
panel.border = element_rect(linetype = "dashed", colour = "black", fill = NA),
plot.title = element_text(hjust = 0.5, size=36))
dev.off()