The local
package is designed to provide an easy way to store all of your on the fly functions in one place. Once saved when the package loads then all of the functions you've saved using the package will be reloaded. This is a convenient alternative to writing your functions into a script so that they're all in one place.
Eventually the goal is to make it easy to turn the functions stored into 'local' into their own package. Keep your eyes open for another package soon to come that will allow one to write documentation for functions made on the fly. Make sure that this package gets installed in a location that you have read/write access to or it will not work as intended.
Currently there isn't a release on CRAN.
You can, however, download the zip ball or tar ball, decompress and run R CMD INSTALL
on it, or use the devtools package to install the development version:
## Make sure your current packages are up to date
update.packages()
## devtools is required
library(devtools)
install_github("local", "Dasonk")
Currently when you store functions or data into the database then the next time the local package is loaded they will get written to the global environment. This is less than ideal and eventually the goal is to write them to their own namespace but... I need to learn a little more to do that. So currently this package is dangerous to use because it can and will write over any functions or data in your current global environment if it shares a name with anything in the local database. The next step which will come very soon is to create a conflict management system so that other objects don't get written over and you have options on what to do in case of a name collision. Giving local its own namespace would, of course, eliminate the need to this.
- Be able to document functions and/or datasets on the fly
- Specify a package name to save functions and/or data into
- Mainly the goal is to be able to document functions on the fly but I figured it would be necessary to have the functions in some sort of package to do that and thus
local
was born. This would be nice for people who don't have the know-how or don't want to take the time to create and build and install a package just to have help pages for functions they created. - The documentation would be nice to have displayed like a normal R help file but for the short term I'll settle for a function that can display some sort of help for functions saved using
local
. The syntax for this is still way up in the air.