I made an R package for personal use, but the way I load it is by individual files. Such as:
source("../compr/R/compr.R")
source("../compr/R/error_df.R")
source("../compr/R/rmse.R")
I would like to load the entire package, which is called compr
, as I would other libraries.
If you are using RStudio, I would suggest creating a project and setting it to your compr
directory. After that you will be able to use devtools::load_all()
to load your package directly.
If you don't want to do this, or you don't use RStudio devtools::load_all('path/to/compr')
will also work.
PS compr
directory needs to be the root of the package ie the place where your DESCRIPTION file is.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.