readr_example: Get path to readr example

Description Usage Arguments Examples

View source: R/example.R

Description

readr comes bundled with a number of sample files in its inst/extdata directory. This function make them easy to access

Usage

1

Arguments

file

Name of file. If NULL, the example files will be listed.

Examples

1
2
readr_example()
readr_example("challenge.csv")

Example output

[1] "challenge.csv"     "epa78.txt"         "example.log"      
[4] "fwf-sample.txt"    "massey-rating.txt" "mtcars.csv"       
[7] "mtcars.csv.bz2"    "mtcars.csv.zip"   
[1] "/usr/lib/R/site-library/readr/extdata/challenge.csv"

readr documentation built on Aug. 10, 2021, 5:06 p.m.