Please note that this project is released with a Contributor Code of Conduct
. By participating in this project you agree to abide by its terms.
The devtools
R
package is required in order to install any packages from GitHub
. Run the following code in an R
console:
if (!'devtools' %in% rownames(installed.packages())) {
install.packages('devtools')
}
devtools::install_github('paul-james/pjames')
This R
package repo is a collection of functions put together for use by me and my friends. This is meant to help keep your .Rprofile
and the global environment clear. For example, the rm(list = ls())
command clears out any custom functions defined in the .Rprofile
because those functions are part of the global environment. This also saves time and effort pasting/sourcing commonly used functions to the top of every R
script you write. All these manual steps can be avoided with the use of a package.
Using the functions within this package, though helpful for everyday coding, may pose a repoducibility issue. If you were to share your sweet script with someone and you used one of the functions defined in this package, your friend will get errors, Error: could not find function "mylib"
, if they don’t also have access to the package on their computer/server.
A few methods for reproducibility:
plotly
or dplyr
.Base R
equivalents.source()
in that script of functions.
The problem with adopting the last two methods listed is if you’re using the same user defined functions across many/all projects, then you’re copying and pasting them into every single project.