How to delete blank lines with readLines in R?

Viewed 7781

If there are many blank lines in a file, how to delete blank lines with readLines in R?

I know I can use blank.lines.skip=Tin read.table to delete it, how about in readLines?

Also, how do I delete the last \n with readLines?

2 Answers
Related