- Update on 2023-05-15
-
Please ignore this post. This project has been archived because the original motivation is no longer valid.
Two weeks ago I announced the repository macos.rbind.io, and asked for feedback in RStudio Community. After reading my colleague Jim Hester’s feedback and doing some research on the differences between brew install r and brew install --cask r, I decided to switch to the latter.1 Consequently, I changed the scope of the repository macos.rbind.io to only building the missing binary packages on CRAN. Windows users may have heard of the so-called “CRANextra” repository, which contains binary R packages that are not available on CRAN. The repository macos.rbind.io is also a CRANextra repository, but created for macOS users.
The full documentation is on the repository homepage https://macos.rbind.io. In short, you just add an extra CRAN repository in your global option repos, e.g.,
options(repos = c(
CRANextra = 'https://macos.rbind.io',
CRAN = 'https://cran.rstudio.com'
))
Then you will be able to install some missing binary R packages, such as RGtk2, provided that your R was installed via brew install --cask r.
While working on this CRANextra repository, I briefly looked at some users’ work on installing the rattle package, which depends on RGtk2 and cairoDevice. It was such a big mess! There were people still using MacPorts, and some were trying to edit the gtk+ formula in Homebrew and building gtk+ from source. With the above CRANextra repository, all you need is:
system('brew install gtk+')
install.packages('rattle')
There will be no more Step 1, 2, …, and 12.
To be clear, eventually I hope this repository can be retired and CRAN can provide the missing binaries. From what I understand, the major obstacle at the moment is the missing support for OpenMP (-fopenmp) in the system Clang on macOS, so CRAN provided a homemade version of Clang. I don’t know why that is so critical, but I wish one day packages could just build out of the box (or at least make it possible to automate the process). Personally I always frown upon software that tries to turn average users into sysadmins: What does -fopenmp even mean? What is Makevars? And SHLIB_OPENMP_CFLAGS? And R CMD javareconf? Sigh. We all love software.
-
One reason for this was that
brew install rdoes not supportcairo, so you cannot use graphical devices such assvg()orcairo_pdf(). Anyway,brew install --cask rinstalls the official version of R from CRAN, which supports features likeinstall.packages(..., type = 'both'). ↩︎
Donate
As a freelancer (currently working as a contractor) and a dad of three kids, I truly appreciate your donation to support my writing and open-source software development! Your contribution helps me cope with financial uncertainty better, so I can spend more time on producing high-quality content and software. You can make a donation through methods below.
-
Venmo:
@yihui_xie, or Zelle:xie@yihui.name -
Paypal
-
If you have a Paypal account, you can follow the link https://paypal.me/YihuiXie or find me on Paypal via my email
xie@yihui.name. Please choose the payment type as “Family and Friends” (instead of “Goods and Services”) to avoid extra fees. -
If you don’t have Paypal, you may donate through this link via your debit or credit card. Paypal will charge a fee on my side.
-
-
Other ways:
WeChat Pay (微信支付:谢益辉) Alipay (支付宝:谢益辉) 

When sending money, please be sure to add a note “gift” or “donation” if possible, so it won’t be treated as my taxable income but a genuine gift. Needless to say, donation is completely voluntary and I appreciate any amount you can give.
Please feel free to email me if you prefer a different way to give. Thank you very much!
I’ll give back a significant portion of the donations to the open-source community and charities. For the record, I received about $30,000 in total (before tax) in 2024-25, and gave back about $15,000 (after tax).