Hi,
I am trying to create a new variable through mutate. I have to select two existing variables from dataset , one variable named total_hit should have values above 40 and second variable total_work should have values above 80. These observations should be put in a new variable total_hit_work . For this i use the below formula but it shows error;
data_new<-data %>%
select(total_hit, total_work) %>%
filter(total_hit>"40", total_work>"80")
data_new<-data %>%
mutate(total_hit_work=parsenumber(total_hit>40 & total_work>80))
It shows error in showing the observations in the new variable. How to correct the code. Need help! Thanks