dpjr_data | R Documentation |
dpjr comes bundled with various data files in its 'inst/extdata' directory. This function make them easy to access.
dpjr_data(path = NULL)
path |
Name of file in quotes with extension; for example '"mpg.csv"' will work. If 'NULL', the example files will be listed. |
This function is adapted from 'readxl::readxl_example()' and 'palmerpenguins::path_to_file'.
# return a list of all the files in the package
dpjr_data()
#
# return the full path of the named file
dpjr_data("mpg.csv")
#
# return the head (first 6 rows) of the named file
head(read.csv(dpjr_data("mpg.csv")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.