R mac X11 library is missing: install XQuartz from xquartz.macosforge.org

Today, when I ran the fix code, the following error occurred:

> fix(Carseats)
Error in check_for_XQuartz() : 
  X11 library is missing: install XQuartz from xquartz.macosforge.org

The MAC solution is simple and can be installed with BREW:

brew cask install xquartz

Finally, reboot and let the program take effect.
reference
[1]. The ggplot2 sourcing error: X11 library is missing. https://stackoverflow.com/questions/28984243/ggplot2-sourcing-error-x11-library-is-missing

Read More: