I have a 721 x 26 dataframe. Some rows have entries that are blank. It’s not NULL
or NA but just empty like the following. How can I delete those rows that have these kind of entries?
1 Y N Y N 86.8
2 N N Y N 50.0
3 76.8
4 N N Y N 46.6
5 Y Y Y Y 30.0
The answer to this question depends on how paranoid you want to be about the sort of things that might be in ‘blank’-appearing character strings. Here’s a fairly careful approach that will match the zero-length blank string
""as well as any string composed of one or more[[:space:]]characters (i.e. “tab, newline, vertical tab, form feed, carriage return, space and possibly other locale-dependent characters”, according to the?regexhelp page).