title: Can't permanently change the CRAN repository in R (OS X)
body: <p>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 <a href="https://stackoverflow.com/questions/1189759/expert-r-users-whats-in-your-rprofile">this SO question</a> and <a href="https://stackoverflow.com/questions/8475102/set-default-cran-mirror-permanent-in-r">this SO question</a> and <a href="http://www.r-bloggers.com/permanently-setting-the-cran-repository/" rel="nofollow noreferrer">this webpage</a>, and have put this into my .Rprofile file:</p>
  
  <pre><code># Change the default repository
  local({r &lt;- getOption("repos")
         r["CRAN"] &lt;- "https://cran.cnr.berkeley.edu/" 
         options(repos=r)
  })
  print(getOption("repos"))
  </code></pre>
  
  <p>This snippet is pretty much straight from R's own <code>example("Startup")</code> stuff, and it sure seems like it ought to work.  I have it as the first thing in my <code>.Rprofile</code>, and the rest of my <code>.Rprofile</code> is trivial and does not touch this option.  If I quit an relaunch R.app, I see this output from my <code>print</code> statement, at the appropriate place in the startup:</p>
  
  <pre><code>                            CRAN 
  "https://cran.cnr.berkeley.edu/" 
  </code></pre>
  
  <p>So that looks great, right?  Unfortunately, if I then type <code>getOption("repos")</code> I get this:</p>
  
  <pre><code>                              CRAN 
  "http://cran.parentingamerica.com" 
  </code></pre>
  
  <p>Unfortunately, the <code>parentingamerica.com</code> mirror appears to be dead, at least today.  Somebody is setting the option after my <code>.Rprofile</code>, and I can't figure out who.  I have no <code>~/.RData</code> file; no workspace is getting loaded on launch.  I have no <code>.Rprofile.site</code> file, and the <code>Renviron</code> file in the R install is the default one, with no mention of "parentingamerica.com" and no setting of the <code>"repos"</code> option.  Indeed, I have done a find/grep on my entire <code>R.framework</code> directory for any file containing "parentingamerica" and have come up empty-handed.  The only things in my <code>R_HOME/etc/</code> 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".</p>
  
  <p>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??</p>