read_builtin {readr} | R Documentation |
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")
}
[Package readr version 1.4.0 Index]