I have imported from Excel a file that after being imported has the following str
str(mydata)
$ Injury : chr "MMCAI" "MMCAI" "MMCAI" "MMCAI" ...
$ Na_RR : num 161 152 152 150 143 ...
$ place : chr "core" "core" "core" "core" ...
Now I want to create 5 different groups combining vars "Injury" and "place" I have this code
mydata$group[mydata$Injury=="MMCAI" & mydata$place=="core"]<- "IC"
However, after passing the code I got observations that are classified as NA i.e:
231 core MMCAI 138.8168 3.253879 core IC
232 core MMCAI 142.7655 3.096850 core NA
233 core MMCAI 141.1135 3.066894 core NA
234 core MMCAI 137.1993 2.922434 core NA
235 core MMCAI 138.3765 2.848378 core NA
I cannot find the error... Any help will be greatly appreciated
Thanks
Aucun commentaire:
Enregistrer un commentaire