jeudi 1 février 2018

R - Change value in one column based on NA value in another column

I am working on a dataset which has information about the education of users.

I want to change a value in the Freq column to "0" based on a NA value in Var1. So if Var1 = NA, then Freq = 0.

See picture

For the life of me I can not figure it out and need some help.

Do any of you guys know how to deal with this?

Aucun commentaire:

Enregistrer un commentaire