how to change gender factor into an numerical coding in r

前端 未结 2 879
旧巷少年郎
旧巷少年郎 2021-01-16 11:19

I have a factor of males and females say c(\"male\", \"female\",\"female\") and I want to create a vector of c(0,1,1) How can i change that in r?

2条回答
提交回复
热议问题