knit Error - output to Word - Error in check_for_XQuartz() : X11 library is missing: install XQuartz from xquartz.macosforge.org

I am trying to save my word document in Markdown. Anytime I use the knit button, I encounter the message below. How do I fix this?

Line 14: library(readr)
#Load the data into R
SampleData_trim <- read_delim("~/Downloads/R project/SampleData.trim.txt", 
    "\t", escape_double = FALSE, trim_ws = TRUE)
View(SampleData_trim) 


Quitting from lines 14-25 (R_Project.Rmd) 
Error in check_for_XQuartz() : 
  X11 library is missing: install XQuartz from xquartz.macosforge.org
Calls: <Anonymous> ... withVisible -> eval -> eval -> View -> check_for_XQuartz
Execution halted

It seems that you are using Mac. A recent OS update deleted the symlinks of X11 and X11R6. That's why you are getting such a message.

But it has a simple solution. Just re-install XQuartz from http://xquartz.macosforge.org. The fresh installation will re-create the symlinks again.

5 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.