Skip to content
Prev 174658 / 398506 Next

read in large data file (tsv) with inline filter?

On Monday 23 March 2009, David Reiss wrote:
How about pre-filtering before loading the data into R:

grep -E 'your pattern here' your_file_here > your_filtered_file

alternatively if you need to search in fields, see 'awk', and 'cut', or if you 
need to delete things see 'tr'.

These tools come with any unix-like OS, and you can probably get them on 
windows without much effort.


Cheers,
Dylan