I am new to R and I need help with data cleaning.
In my data set (called "Survey") I want to join/merge/combine (however) two columns into one: the columns "Gender" and "Geschlecht" should be one column together, called "Sex".
I used the following command:
Survey$Sex <- paste(Survey$Gender, "", Survey$Geschlecht)
And this it my outcome:
Gender Geschlecht Sex
1 NA 1 NA 1
2 NA 1 NA 1
3 NA 1 NA 1
4 NA 0 NA 0
5 NA 0 NA 0
6 NA 0 NA 0
I would like to remove/omit the NAs in the "Sex" column
Like this (desired outcome):
Gender Geschlecht Sex
1 NA 1 1
2 NA 1 1
3 NA 1 1
4 NA 0 0
5 NA 0 0
6 NA 0 0
How do I do this? :-) Please help!