use_build_ignore: Add files to '.Rbuildignore'

View source: R/ignore.R

use_build_ignoreR Documentation

Add files to .Rbuildignore


.Rbuildignore has a regular expression on each line, but it's usually easier to work with specific file names. By default, use_build_ignore() will (crudely) turn a filename into a regular expression that will only match that path. Repeated entries will be silently removed.

use_build_ignore() is designed to ignore individual files. If you want to ignore all files with a given extension, consider providing an "as-is" regular expression, using escape = FALSE; see examples.


use_build_ignore(files, escape = TRUE)



Character vector of path names.


If TRUE, the default, will escape . to ⁠\\.⁠ and surround with ^ and $.


## Not run: 
# ignore all Excel files
use_build_ignore("[.]xlsx$", escape = FALSE)

## End(Not run)

usethis documentation built on July 9, 2023, 7:23 p.m.