mardi 14 novembre 2017

I want to group values in a data.frame in R

My column in the data.frame looks like this:

iq$pt1.res

101

normal

abnormal

95

<50

normal

...

Once I want to replace all the nummeric values with NA, save it in a new vector "iqn" and then produce another vector which sets values between 85 and 115 as "normal" and others as "abnormal"

Aucun commentaire:

Enregistrer un commentaire