How to Use fread() in R to Import Files Faster
- R-PROGRAMMING
The fread() function from data.table package used to read large data files in R.
The following method shows how you can do it with syntax.
Method: Use fread() Function
library(data.table) fread("file_name") The following example shows how to use fread() function in R.
Use fread() Function From data.table Package Let’s see how we can use fread() function to read data from CSV file:
# Import library library(data.table) # Import CSV file data <- fread("product.