Problem in Knitting a R Markdown File:

While knitting my R Markdown file, I am facing the following error:

Quitting from lines 22-26 [unnamed-chunk-2] (R-Coding.Rmd)

Error in check_for_XQuartz():
! X11 library is missing: install XQuartz from

  1. utils::View(penguins)
  2. utils:::check_for_XQuartz(file.path(R.home("modules"), ""))
    Execution halted

Did the error message go away after you installed XQuartz?

I cannot install XQuartz. When I try to install this package, an error appears which states " the object not found"