I am trying to run an ANOVA test after using melt and the error keeps popping up. I do not know what I'm doing wrong
Error in eval(predvars, data, env) : object 'W' not found
rm(list=ls())
Measurements=matrix(c(1.4,1.6,1.8,2.4,2.1,2.1,2.3,2.4,2.6,2.7,2.5,2.1,1.2,1.9,2.0,2.4,2.2,2.2,2.3,2.3,2.3,2.0,2.2,2.3,1.0,1.3,1.8,2.0,2.1,2.0,2.1,2.4,2.4,2.5,2.3,2.1,2.2,2.9,3.2,3.9,3.5,3.6,3.3,3.6,3.4,3.6,3.8,4.0,2.3,3.2,3.9,4.0,4.0,4.1,3.9,4.0,3.9,3.7,3.9,4.1,1.3,1.7,1.9,2.3,2.2,2.1,2.2,2.3,2.2,2.3,2.5,2.6,3.1,3.2,3.9,4.7,4.3,4.1,4.3,4.5,4.3,4.4,4.8,5.0,3.5,3.8,3.9,5.4,5.1,5.0,5.2,5.4,5.5,5.4,5.5,5.8,2.0,2.3,2.8,3.6,3.4,3.3,3.3,3.6,3.7,3.6,3.7,3.8),nrow=36)
colnames(Measurements)=c("Rest","Walk","Play")
Measurements=data.frame(Measurements)
write.csv(Measurements,"TanyaG_Measurements_data.csv")
Measurements
boxplot(Measurements,ylab="Ounces",xlab="Dogs_Activity",main="Water_Intake",notch=FALSE)
install.packages("reshape2")
library(reshape2)
reshape2::melt
ALL<-melt(Measurements,variable.name="A",value.name="W")
ALL
AnovaTest<- aov(W~A,data.frame="ALL")
summary(AnovaTest)
I have tried changing the names, changing the codes and i can not seem to figure out what to do