I tried to use mutate and case_when to build a new variable. My codes is:
mutate
case_when
mutate( x= case_when(grepl("Happy", Feeling), &q