[R] .Rprofile with devtools::install_github() loops
Chris Evans
chr|@ho|d @end|ng |rom p@yctc@org
Wed Feb 10 09:45:19 CET 2021
I am sure this must be documented somewhere and that I'm missing something obvious but some searching isn't finding an answer and I'm sure there is one.
I have created a very simple package on GitHub and want my machines (other than the one that built it) to load it when they start R using devtools::install_github()
The install_github() call works fine from the console but when I put it in my .Rprofile it just loops on restarting R. I _think_ it may be that devtools::install_github()
is restarting the session as I found one thing on the web suggesting that may be the case. However, I think if it were the case it would be documented and I'd find
far more about that.
OK. So my .Rprofile is:
print("This is a message from /home/chris/.Renviron: hello Chris!")
.First <- function(){
devtools::install_github("xxxx/yyyy")
}
print("OK, off you go!")
I have obscured my package to protect my blushes but I get the same behaviour with r-lib/devtools and, as I say, my little package loads OK from the console.
You can see I tried wrapping it in a .First() function but that didn't change anything.
True both on a Linux machine and a Windows machine.
OK. Anyone save me from more dents in the wall and frontal lobe damage?!
TIA,
Chris
--
Small contribution in our coronavirus rigours:
https://www.coresystemtrust.org.uk/home/free-options-to-replace-paper-core-forms-during-the-coronavirus-pandemic/
Chris Evans <chris using psyctc.org> Visiting Professor, University of Sheffield <chris.evans using sheffield.ac.uk>
I do some consultation work for the University of Roehampton <chris.evans using roehampton.ac.uk> and other places
but <chris using psyctc.org> remains my main Email address. I have a work web site at:
https://www.psyctc.org/psyctc/
and a site I manage for CORE and CORE system trust at:
http://www.coresystemtrust.org.uk/
I have "semigrated" to France, see:
https://www.psyctc.org/pelerinage2016/semigrating-to-france/
https://www.psyctc.org/pelerinage2016/register-to-get-updates-from-pelerinage2016/
If you want an Emeeting, I am trying to keep them to Thursdays and my diary is at:
https://www.psyctc.org/pelerinage2016/ceworkdiary/
Beware: French time, generally an hour ahead of UK.
More information about the R-help
mailing list