I've been stuck on a particular problem. I've created an rmd file and everything is how I'd like it, however, when I knit the rmd file into any format (HTML, pdf, word) the rmd.file will produce the ggplots with NA values. On the other hand, if I run the code chunks in the rmd script it comes out how it should do with no NA values. Just to note there are no NA values to begin with. Any suggestions for how I could fix this?
images attached below:
CodePudding user response:
I can't try it myself without some reproducible example, but have you tried including drop_na()
function?
all_trips_v2 %>%
drop_na() %>% ...
or maybe below
... arrange(user_type, weekday) %>%
drop_na() %>% ...