Monday, 9 September 2013

How to Sample a specific proportion of lines from a big file in R?

How to Sample a specific proportion of lines from a big file in R?

I have a huge file of coordinates about 125 million lines. I want to
sample these lines to obtain say 1% of all the lines so that I can plot
them. Is there a way to do this in R? The file is very simple, it has only
3 columns, and I am only interested in first two. A sample of the file
would be as follows:
1211 2234
1233 2348
..
..
..
Any help / pointer is highly appreciated.

No comments:

Post a Comment