I am using the dplyr filter function in the simplest possible way, selecting all rows of a dataframe whose first column equals 800. It returns these rows, but appends an extra row with 800 in the first column and NA's in the rest. Can anyone explain what's going on here?
My bet would be, You always had such a row in there, you just weren't aware of it.
No, I didn't, the file has no such row.
To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:
Dear nirgrahamuk,
You were right and I was too quick to dismiss your original suggestion. When I searched for 'NA's in one of the other columns I found two rows with 'NA's in all the columns. They were at the end of the dataframe, not contiguous with the other rows containing 800 in the first column. Your suggestion prompted me to look for the offending rows more widely.
Many thanks for your interest and support.
Thanks for graciously returning and letting us know.
Glad it was a happy ending.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.