I'm using devtools to handle a package I'm working on.
If I run R
and then run
library(devtools)
devtools:::load_all()
I am able to view my packages documentation.
However, I'm trying to create an alias to automate the launching of R (it's actually going into a Makefile). So I created a file "load.R" with those two lines, then run
R_PROFILE=load.R R
I get my package loaded properly (e.g. I can do mypackage:::
and see all functions) but I cannot access my help files.
(If I start R and run source("load.R")
I can see my help files, so I'm confident it's not a typo or something else foolish.)
I'm thinking it might have something to do with the timing of the load_all
call; I believe passing a R_PROFILE
runs the code before the session becomes interactive. So, alternatively, is there a way to run something like
R -e 'source("load.R")'
and have it stay interactive instead of quitting after the code terminates?
Thanks.