# List all files in the example directory provided by the package
example_files()
# Get the full path to a specific example files
example_files("penguins.R") # path/to/basepenguins/extdata/penguins.R
example_files("nested/penguins.qmd")
# Get the path to the directory containing the example files
example_dir() # path/to/basepenguins/extdata/
.old_wd <- setwd(tempdir())
# Copy all files in the example directory
example_dir(".") # copy example files into working directory
example_dir("examples") # create subdirectory
setwd(.old_wd)
Run the code above in your browser using DataLab