knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of pkgfiles is to enumerate and classify all files in an R package project. This is mostly useful for other packages that iterate over all files of a specific kind in an R package.
Once released, you can install the released version of pkgfiles from CRAN with:
install.packages("pkgfiles")
For now, install from GitHub with
# install.packages("devtools") devtools::install_github("krlmlr/pkgfiles")
The pf_get()
function enumerates and classifies all files in the current project.
library(pkgfiles) pf_get()
Under the hood, the returned object is a tibble that contains the return from a fs::dir_info()
call augmented by a class
column:
tibble::as_tibble(pf_get())
The classification is based on regular expressions for the project-relative path of the files. This list is extensible but the existing entries should rarely change.
pkgfiles:::classification
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.