Learn R Programming

readr (version 2.1.3)

read_builtin: Read built-in object from package

Description

Consistent wrapper around data() that forces the promise. This is also a stronger parallel to loading data from a file.

Usage

read_builtin(x, package = NULL)

Value

An object of the built-in class of x.

Arguments

x

Name (character string) of data set to read.

package

Name of package from which to find data set. By default, all attached packages are searched and then the 'data' subdirectory (if present) of the current working directory.

Examples

Run this code
read_builtin("mtcars", "datasets")

Run the code above in your browser using DataLab