Starting out _ Object wasn't defined?

Hey guys. I'm just starting out with R.
I'm trying to do something as simple as creating an object and then calling it in a function, but R tells me that the object hasn't been created. This is the code:
re_df<- read.csv (file="../data/week2.csv", header=TRUE)
levels(rt_df$condition) <- factor (c("Control","Experimental"))

and this is the console answer to it:

re_df<- read.csv (file="../data/week2.csv", header=TRUE);
levels(rt_df$condition) <- factor (c("Control","Experimental"));
Error in levels(rt_df$condition) <- factor(c("Control", "Experimental")) :
object 'rt_df' not found

It's probably a silly question but since I am just starting out there will probably more of those, might as well embrace it!

Thank you in advance!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.