Get startedGet started for free

Compare read.delim() and read.delim.raw()

When processing a sequence of contiguous chunks of data on a hard drive, iotools can turn a raw object into a data.frame or matrix while - at the same time - retrieving the next chunk of data. These optimizations allow iotools to quickly process very large files.

This exercise is part of the course

Scalable Data Processing in R

View Course

Exercise instructions

  • Time the reading of a file using read.delim() five times.
  • Time the reading of a file using read.delim.raw() five times.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Load the iotools and microbenchmark packages
___
___

# Time the reading of files
___(
    # Time the reading of a file using read.delim five times
    ___("mortgage-sample.csv", header = FALSE, sep = ","),
    # Time the reading of a file using read.delim.raw five times
    ___("mortgage-sample.csv", header = FALSE, sep = ","),
    times = ___
)
Edit and Run Code