Reading in Larger Datasets With Read - Table Reading in Larger Datasets With Read - Table
Reading in Larger Datasets With Read - Table Reading in Larger Datasets With Read - Table
table
With much larger datasets, doing the following things will make your life easier and will prevent R
from choking.
Read the help page for read.table, which contains many hints
Make a rough calculation of the memory required to store your dataset. If the dataset is larger
than the amount of RAM on your computer, you can probably stop right here.
Set comment.char = "" if there are no commented lines in your file.
6/9
Set nrows. This doesnt make R run faster but it helps with memory usage. A mild overestimate
is okay. You can use the Unix tool wc to calculate the number of lines in a file.
7/9
8/9
9/9