Hey thanks, I'm familiar na.omit() function for the whole dataset. But it does not seem to work. Any idea what is going wrong?
Below I paste the following:
- the result when I run na.omit
- the result when I (subsequently) run a simple table count/percent
Thx for your input ....
- the result when I run na.omit:
> na.omit(newdata)
# A tibble: 0 x 75
# … with 75 variables: id <dbl>, block <dbl>, timestart <dttm>, answertime <dbl>, email <chr>, city <dbl>, city25MultipleCho <dbl>, city25tx <chr>, greenspace <dbl>, rectrain <dbl>, recwalk <dbl>, recpicnik <dbl>,...... etc etc etc ...
- the result when I (subsequently) run a simple table count/percent
> newdata %>% group_by(gender) %>% summarise(count = n() / nrow(.))
# A tibble: 4 x 2
gender count
<fct> <dbl>
1 female 0.471
2 male 0.518
3 other 0.00660
4 NA 0.00377
Warning message:
Factor `gender` contains implicit NA, consider using `forcats::fct_explicit_na`