I'm tearing my hair out trying to figure out why I am unable to permanently change the CRAN repository used in R on my OS X 10.11.3 system. I've followed the instructions that are all over the web, such as this SO question and this SO question and this webpage, and have put this into my .Rprofile file:
# Change the default repository
local({r <- getOption("repos")
r["CRAN"] <- "https://cran.cnr.berkeley.edu/"
options(repos=r)
})
print(getOption("repos"))
This snippet is pretty much straight from R's own example("Startup")
stuff, and it sure seems like it ought to work. I have it as the first thing in my .Rprofile
, and the rest of my .Rprofile
is trivial and does not touch this option. If I quit an relaunch R.app, I see this output from my print
statement, at the appropriate place in the startup:
CRAN
"https://cran.cnr.berkeley.edu/"
So that looks great, right? Unfortunately, if I then type getOption("repos")
I get this:
CRAN
"http://cran.parentingamerica.com"
Unfortunately, the parentingamerica.com
mirror appears to be dead, at least today. Somebody is setting the option after my .Rprofile
, and I can't figure out who. I have no ~/.RData
file; no workspace is getting loaded on launch. I have no .Rprofile.site
file, and the Renviron
file in the R install is the default one, with no mention of "parentingamerica.com" and no setting of the "repos"
option. Indeed, I have done a find/grep on my entire R.framework
directory for any file containing "parentingamerica" and have come up empty-handed. The only things in my R_HOME/etc/
directory are Makecof, Renviron, javaconf, ldpaths, and repositories. I'm not sure what that repositories file is used for exactly, but it does not contain "parentingamerica".
I've been going around and around on this all morning. Any idea where this %^$@* parentingamerica.com option is coming from and how I can kill it dead??