Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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)

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.

Value

An object of the built-in class of x.

Examples

if (requireNamespace("dplyr")) {
  read_builtin("starwars", "dplyr")

  read_builtin("storms", "dplyr")
}

readr

Read Rectangular Text Data

v1.4.0
GPL (>= 2) | file LICENSE
Authors
Hadley Wickham [aut], Jim Hester [aut, cre], Romain Francois [ctb], R Core Team [ctb] (Date time code adapted from R), RStudio [cph, fnd], Jukka Jylänki [ctb, cph] (grisu3 implementation), Mikkel Jørgensen [ctb, cph] (grisu3 implementation)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.