should_read_lazy: Determine whether to read a file lazily

View source: R/utils.R

should_read_lazyR Documentation

Determine whether to read a file lazily

Description

This function consults the option readr.read_lazy to figure out whether to do lazy reading or not. If the option is unset, the default is FALSE, meaning readr will read files eagerly, not lazily. If you want to use this option to express a preference for lazy reading, do this:

options(readr.read_lazy = TRUE)

Typically, one would use the option to control lazy reading at the session, file, or user level. The lazy argument of functions like read_csv() can be used to control laziness in an individual call.

Usage

should_read_lazy()

See Also

The blog post "Eager vs lazy reading in readr 2.1.0" explains the benefits (and downsides) of lazy reading.


readr documentation built on May 29, 2024, 2:37 a.m.