You're issue is likely a result of using na.omit
on the individual columns. I would suggest not using that. Also, I am not sure if that is just a result of copy-paste stuff but you are missing a parenthesis at the end of your paste
call.
As a note, it is extremely hard to help debug code, data, and/or error messages when screenshots are posted. Posting screenshots, instead of actual code/data/error messages, is likely to decrease your chances of getting the help you are looking for in general. Instead of posting a screenshot, please copy and paste the code and error message and format the pasted code/error messages as shown below.
To share you data, I recommend taking a look at this thread on sharing example data
Put code that is inline (such as a function name, like mutate
or filter
) inside of backticks ( mutate
) and chunks of code (including error messages and code copied from the console) can be put between sets of three backticks:
```
example <- foo %>%
filter(a == 1)
```
This process can be done automatically by highlighting your code, either inline or in a chunk, and clicking the </>
button on the toolbar of the reply window!
This will help keep our community tidy and help you get the help you are looking for!
For more information, please take a look at the community's FAQ on formating code