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

readr_example(file = NULL)

Arguments

file

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

Examples

readr_example()
#> [1] "challenge.csv" "epa78.txt" "example.log" #> [4] "fwf-sample.txt" "massey-rating.txt" "mtcars.csv" #> [7] "mtcars.csv.bz2" "mtcars.csv.zip"
readr_example("challenge.csv")
#> [1] "/data/GHE/mpn/deployment/deployments/2020-10-26/renv/library/R-3.6/x86_64-pc-linux-gnu/readr/extdata/challenge.csv"