[R] How do I know which package is loaded?
Aron Lindberg
aron.lindberg at case.edu
Wed Feb 18 17:12:12 CET 2015
Hi All,
In short: what’s a good workflow for forking/rewriting/testing code in packages?
I’m trying to contribute to a package on Github. So I fork it and then clone my forked repo into my desktop, and then I open the files I want to edit in RStudio.
However, to actually test that the code works, I need to load the package from the local version on my machine. I think I can do this using:
library(rgithub, lib.loc = “/Users/Aron/github/local/rgithub/“)
However, this fails:
Error in library(rgithub, lib.loc = “/Users/Aron/github/local/“) :
there is no package called ‘rgithub’
Do I need to install the library from the local repo first somehow? How do I do this?
If I got it to work I assume I would be able to run
sessionInfo()
Which would then enable me to see which version of the package is loaded. However, the version number would be the same as the package that I can install using devtools, e.g. devtools::install_github(“cscheid/rgithub”. How can I check whether I have loaded my local development copy or the “official” copy that I also have on my machine?
In short: what’s a good workflow for forking/rewriting/testing code in packages?
Best,
Aron
--
Aron Lindberg
Doctoral Candidate, Information Systems
Weatherhead School of Management
Case Western Reserve University
aronlindberg.github.io
[[alternative HTML version deleted]]
More information about the R-help
mailing list