Quicker way to read single column of CSV file

前端 未结 2 690
遇见更好的自我
遇见更好的自我 2021-02-13 17:51

I am trying to read a single column of a CSV file to R as quickly as possible. I am hoping to cut down on standard methods in terms of the time it take

2条回答
  •  时光取名叫无心
    2021-02-13 18:27

    There is a speed comparison of methods to read large CSV files in this blog. fread is the fastest by an order of magnitude.

    As mentioned in the comments above, you can use the select parameter to select which columns to read - so:

    fread("main.csv",sep = ",", select = c("f1") ) 
    

    will work

提交回复
热议问题