#Example 1 #Check the working directory getwd() #Set the working directory setwd("C:/Users/RRWHITE/Documents") #Read in the csv you just created d <- read.csv("ExampleData.csv") #Print the dataframe d d #Summarize the dataframe d summary(d) #Convert the data from wide to long format library(reshape2) m <- melt(d, id=c("Treatment", "Animal.ID")) m #Visualize the data library(ggplot2) ggplot(m, aes(x=Treatment, y=value))+geom_boxplot() ggplot(m, aes(x=variable, y=value, fill=Treatment))+geom_boxplot() #Change the variable names names(m) <- c("Treatment", "Animal.ID", "Period", "Dig")