LoslegenKostenlos loslegen

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.

Diese Übung ist Teil des Kurses

Scalable Data Processing in R

Kurs anzeigen

Anleitung zur Übung

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

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# 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 = ___
)
Code bearbeiten und ausführen