[R-SIG-Mac] Problems with "rgl"

1,098 views
Skip to first unread message

José Carlos Guerrero Antúnez

unread,
Jun 10, 2022, 12:10:30 PM6/10/22
to r-sig-mac R
Hi,

When I activate this package "rangemap,
https://cran.r-project.org/web/packages/rangemap/index.html", I get an
error message, apparently it is related to "rgl", and I have reinstalled
it, version 0.108.3.

R version 4.2.0 (2022-04-22) -- "Vigorous Calisthenics"
Platform: x86_64-apple-darwin17.0 (64-bit)

Any suggestions?

Regards,


Registered S3 methods overwritten by 'rgl':
method from
knit_print.rglId
knit_print.rglOpen3d
sew.rglRecordedplot
Error in dyn.load(dynlib <- getDynlib(dir)) :
unable to load shared object
'/Library/Frameworks/R.framework/Versions/4.2/Resources/library/rgl/libs/rgl.so':

dlopen(/Library/Frameworks/R.framework/Versions/4.2/Resources/library/rgl/libs/rgl.so,
6): Library not loaded: /opt/X11/lib/libGLU.1.dylib
Referenced from:
/Library/Frameworks/R.framework/Versions/4.2/Resources/library/rgl/libs/rgl.so
Reason: Incompatible library version: rgl.so requires version 5.0.0 or
later, but libGLU.1.dylib provides version 1.3.0
Error: package or namespace load failed for ‘rangemap’:
.onLoad failed in loadNamespace() for 'rgl', details:
call: rgl.init(initValue, onlyNULL)
error: OpenGL is not available in this build
In addition: Warning messages:
1: Loading rgl's DLL failed.
This build of rgl depends on XQuartz, which failed to load.
See the discussion in https://stackoverflow.com/a/66127391/2554330
2: Trying without OpenGL...



--
José Carlos Guerrero

[[alternative HTML version deleted]]

_______________________________________________
R-SIG-Mac mailing list
R-SI...@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Prof Brian Ripley

unread,
Jun 10, 2022, 1:40:57 PM6/10/22
to José Carlos Guerrero Antúnez, r-sig-mac R
On 10/06/2022 17:09, José Carlos Guerrero Antúnez wrote:
> Hi,
>
> When I activate this package "rangemap,
> https://cran.r-project.org/web/packages/rangemap/index.html", I get an
> error message, apparently it is related to "rgl", and I have reinstalled
> it, version 0.108.3.

But it looks like you have not installed XQuartz. If you have done so
in the past, reinstall it. As you are on Intel Mac, I think you want
XQuartz 2.7.11 as I believe that is what is on the build machine.

As a general BTW, I had to guess that you installed a binary package and
the output below is from library(rgl). But please do tell us such things.
Brian D. Ripley, rip...@stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford

José Carlos Guerrero Antúnez

unread,
Jun 10, 2022, 4:59:04 PM6/10/22
to Prof Brian Ripley, r-sig-mac R
Thank you Brian and Duncan,

The solution was easier than I thought, because I had to have installed
XQuartz 2.8.1 instead of 2.7 and now it works correctly.

Regards,

El vie, 10 jun 2022 a las 14:40, Prof Brian Ripley (<rip...@stats.ox.ac.uk>)
escribió:
--
José Carlos Guerrero

[[alternative HTML version deleted]]

John Helly via R-SIG-Mac

unread,
Jun 12, 2022, 7:05:24 PM6/12/22
to r-sig-mac R
Aloha.

I'm trying to add a state map boundary to a 2D facet_grid in ggplot
which plots correlations against principal components (PC).

The 1D case works but I cannot discover what is causing the failure in
the 2D case.  It may be a limit to facet_grid in some way or, more
likely, something I don't understand.

ggplot(A0G, aes(Longitude, Latitude, color=Correlation)) +
+ geom_point(size=2*abs(A0G$Correlation)) +
+ geom_polygon(data = ca_df, aes(x=Longitude, y=Latitude, fill = NA,
color = "black")) +
+ facet_grid(rows=vars(A0G$Lag), cols=vars(A0G$PC))

Error in `$<-.data.frame`(`*tmp*`, "PANEL", value = c(4L, 3L, 5L, 10L,  :
  replacement has 11112 rows, data has 516

The issue seems related to the dimensions of the map df and the data df
but I can't grok the problem since it works in the 1D case.

> dim(ca_df)
[1] 516   6

> dim(A0G)
[1] 11112    18

Any suggestions welcome.  I'll just keep breaking the problem down if
there isn't anything obvious.

J.

--
John Helly, University of California, San Diego / San Diego Supercomputer Center / Scripps Institution of Oceanography / 760 840 8660 mobile /http://www.sdsc.edu/~hellyj
ORCID ID: orcid.org/0000-0002-3779-0603

[[alternative HTML version deleted]]

David Winsemius

unread,
Jun 13, 2022, 12:49:39 AM6/13/22
to John Helly, r-sig-mac R
This appears to no longer be a Mac problem. Other venues such as StackOverflow, Rstudio help forums or even Rhelp would all be more appropriate.


If you do decide to send to Rhelp , please read the Posting Guide. (At the moment you are sending HTML to a plain text mailing list. )

David

Sent from my iPhone

> On Jun 12, 2022, at 4:05 PM, John Helly via R-SIG-Mac <r-si...@r-project.org> wrote:
>
> Aloha.
Reply all
Reply to author
Forward
0 new messages