This is my code:
SUBJECT$Sim<-as.numeric(SUBJECT$Sim)
Density curve
ggplot(datr, aes(x=Sim)) + geom_density()
R can't find the object Sim although when I do a head command it is listed and I tied to be sure that it was numeric. Can someone tell me what my error is and how to correct it?
head(datr)
SUBJECT.TIME.CMT.Sim.obs.prev_subject.rep.peak
1 1,2,11,7.35,7.55,1,1,1
2 2,4,11,4.68,4.22,2,1,1
3 3,2,11,7.06,6.1,3,1,1
4 4,4,11,3.97,3.13,4,1,1
5 5,4,11,3.3,3.02,5,1,1
6 6,2,11,6.74,6.67,6,1,1
ggplot(datr, aes(x=Sim)) + geom_density()
Error in eval(expr, envir, enclos) : object 'Sim' not found