Friday 15 February 2013

How to read and delete a specific row from a large file with R -


There are 5 rows (1,000 000 rows in total) with a handful of large files:

< P> c6 c24 c32 c54 c67
c6 c24 c32 c51 c68 c78
c6 c32 c54 c67
c6 c32 c55 c63 c 85 c94 c75
c6 c32 c53 c67

Readline () can read one line at a time from 1 rows. When I want to read the 20001 line, readLines () is not so efficient, use the R function to read and delete one from a large file Can be done for a specific line. About using Scan , which has both a

  (" Myfile ", skip = 20000, nlines = 1)  
  scan  and  nlines  leave the argument   

me though Not sure about deletion, usually with R, everything is possible, but I think if you want to make a complete copy of the original file, before you complete the line By the way, sans that specific Nkti you are referencing.

No comments:

Post a Comment