I am interested in excluding two directories inst\\docs and inst\\examples while building and installing the package. I know that an easy way out i
inst\\docs
inst\\examples
Just to update, as of the latest versions, devtools::use_build_ignore has been moved to:
devtools::use_build_ignore
usethis::use_build_ignore(c("yourfolder1", "yourfolder2", "yourfile"))