Hi,
I'm working on an assessment for university. I have load tidyverse, and imported the data using read() to assign directly in the environment.
To explore the data I have used glimpse() and realised some variable needs to be changed. e.g., Camp_1 are dbl and I want to change to factor.
in all of our practices, we had to change to a factor.
to change it I did:
sales <- sales %>%
mutate_(sales, Camp_1=as.factor(Camp_1),
Camp_2=as.factor(Camp_2),
Camp_3=as.factor(Camp_3),
Camp_4=as.factor(Camp_4),
Camp_5=as.factor(Camp_5),
Camp_6=as.factor(Camp_6))
however I get the following message: Error in is.factor(x) : object 'Camp_1' not found
I don't understand the mistake I have made. If someone has an idea it would be very useful.
Thanks