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
You can do
devtools::use_build_ignore(c("yourfolder1", "yourfolder2", "yourfile"))