title: What/where is the ~/.R/Makevars file?
body: <p>I am trying to install the package glmnet.
  I get this error:</p>
  <pre><code>ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin15/6.1.0'
  ld: warning: directory not found for option '-L/usr/local/gfortran/lib'
  ld: library not found for -lgfortran
  </code></pre>
  <p>I installed homebrew.  Then fortran through gcc to get this far.
  I have found many help links that say similar things like this:</p>
  <blockquote>
  <p>you will need to change your compile statements in <code>~/.R/Makevars</code> to gcc using:</p>
  <pre><code>VER=-5.3.0 
  CC=gcc$(VER)
  CXX=g++$(VER)
  CFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion
  CXXFLAGS=-mtune=native -g -O2 -Wall -pedantic -Wconversion
  FLIBS=-L/usr/local/Cellar/gcc/5.3.0/lib/gcc/5
  </code></pre>
  </blockquote>
  <p>I can't find <code>~/.R/Makevars</code> on my Mac!!  I have macOS Catalina 10.15.1.</p>
  <p>I have found two Makevars files. They are linked to Rcpp and have nothing at all similar to the code listed above.</p>
  <p>Sorry for this seemingly basic questions, but two hours in and I can't find anything related to <code>~/.R/Makevars</code>.</p>
  <p>Here is what the one file I did find states:</p>
  <pre><code>## With R 3.1.0 or later, you can uncomment the following line to tell R to 
  ## enable compilation with C++11 (where available)
  ##
  ## Also, OpenMP support in Armadillo prefers C++11 support. However, for wider
  ## availability of the package we do not yet enforce this here.  It is however
  ## recommended for client packages to set it.
  ##
  ## And with R 3.4.0, and RcppArmadillo 0.7.960.*, we turn C++11 on as OpenMP
  ## support within Armadillo prefers / requires it
  CXX_STD = CXX11
  
  PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS) 
  PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
  </code></pre>
  <p>But that was linked to RcppArmadillo.</p>
  <p>I've read these (any many more) many times over:</p>
  <ul>
  <li><a href="https://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html#Installation-of-source-packages" rel="nofollow noreferrer">https://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html#Installation-of-source-packages</a></li>
  <li><a href="https://stackoverflow.com/questions/35999874/mac-os-x-r-error-ld-warning-directory-not-found-for-option">Mac OS X R error &quot;ld: warning: directory not found for option&quot;</a></li>
  <li><a href="https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Clang" rel="nofollow noreferrer">https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Clang</a></li>
  <li><a href="https://nistara.net/post/compile-issues-r/" rel="nofollow noreferrer">https://nistara.net/post/compile-issues-r/</a></li>
  </ul>