unable to load the libarary after successfully installed

I need to include some functions in plot3D. When I installed the package, it shows

trying URL 'https://cran.rstudio.com/bin/macosx/contrib/4.0/plot3D_1.4.tgz'
Content type 'application/x-gzip' length 2795822 bytes (2.7 MB)
downloaded 2.7 MB

The downloaded binary packages are in

But after that, when I try to load the library, it shows an error as the following:

Error: package or namespace load failed for ‘plot3D’:
.onLoad failed in loadNamespace() for 'tcltk', details:
call: fun(libname, pkgname)
error: X11 library is missing: install XQuartz from www.xquartz.org

How to solve the problem? Any idea?

Thanks in advance!

Just follow the instructions from the error message

1 Like

Thanks! I did try to install X11, but recieved this

install.packages("XQuartz", dependencies = TRUE)
Warning in install.packages :
package ‘XQuartz’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at

Any idea?

Should I update R? I thought my R is already the lastest version.

XQuartz isn't an R package, it's a program for your macOS. You can download it from the XQuartz site:

1 Like

It works now! Thanks!

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.