title: Installing R on OSX Big Sur (EDIT: and Apple M1) for use with Rcpp and openMP
body: <p>There's probably a gazillion threads on OSX+Rcpp+openMP, but the bottom line right now appears to be this (per <a href="https://thecoatlessprofessor.com/programming/cpp/r-compiler-tools-for-rcpp-on-macos" rel="nofollow noreferrer">coatless</a>):</p>
  <blockquote>
  <p>Unfortunately, with R 4.0.0 the CRAN distributed version of R loses
  the ability to use OpenMP without a custom setup.</p>
  </blockquote>
  <p>I came across other ideas, including compiling <a href="https://openmp.llvm.org" rel="nofollow noreferrer">llvm</a> yourself, using <a href="https://brew.sh" rel="nofollow noreferrer">homebrew</a> or <a href="https://www.macports.org" rel="nofollow noreferrer">macports</a> to install R and/or llvm and/or gcc, and then figuring out how to use the right compiler and/or flags with (R)cpp. However, I find this all very confusing.</p>
  <p>I am not a mac user, but it seems to me that setting up a mac to compile Rcpp packages or code snippets with openMP seems to be too difficult for most mac users. However, I would like my R package on github to be used by more users, and since it relies on openMP, I am losing that audience.</p>
  <p>Can someone provide the necessary steps to set up R on mac in a way that it can compile Rcpp code with openMP? I'd like to turn that into a quick tutorial.</p>
  <p>EDIT: I should have added - on Apple Silicon, because there are some extra confusions where things go - <code>/usr/local</code> vs <code>/opt</code></p>