[R-pkg-devel] how to make "r-release-osx-x86_64-mavericks" machine support rgl 3D plots

Dirk Eddelbuettel edd at debian.org
Wed Aug 12 14:26:33 CEST 2015

Hi Søren,

On 12 August 2015 at 11:44, Søren Havelund Welling wrote:
| Dear all
| I have a package(forestFloor) which produces an test error when built on the "r-release-osx-x86_64-mavericks" machine. I'm quite sure it's due to Xquartz(or similar) graphical resources have to be installed for 3D plotting. I tried with no luck, to screen the source code of ~15 other packages importing rgl to get some inspiration. Most packages did not run any rgl examples or tests.
| See the error message below
| Questions:
| 1. I there a fix for "r-release-osx-x86_64-mavericks" machine? Could I e.g. specify Xquartz to be installed?
| 2. Should I in general just assume no OSX user has installed Xquartz and link to a OSX install-guide from source in description file?
| 3.  Can I in general test builds on "r-release-osx-x86_64-mavericks" machine somehow without spamming CRAN with submissions?

I don't know about 1) to 3) but may I plead with you to not run rgl code
during R CMD check?

I frequently tests against all reverse dependencies against some of my
packages, ie Rcpp, RcppArmadillo, ... and packages using rgl generally fail
during these tests.

A simple wrapper like

  if (interactive()) {
      # do something

can help in demos or examples. 

| Thanks in advance
| Soren H Welling
| Check DetailsVersion: 1.8.3 
| Check: tests 
| Result: ERROR 
|     Running the tests in ‘tests/stdUsage.R’ failed.
|     Last 13 lines of output:
|      > plot(ffTest42,col=Col,plot_GOF=TRUE,speed=T) 
|      [1] "compute goodness-of-fit with leave-one-out k-nearest neighbor(guassian kernel), kknn package"
|      > 
|      > #if ever needed, k-nearest neighbor parameters for goodness-of-fit can be access through convolute_ff
|      > #a new fit will be calculated and added to forstFloor object as ffTest42$FCfit
|      > ffTest42 = convolute_ff(ffTest42,userArgs.kknn=alist(kernel="epanechnikov",kmax=5))
|      > plot(ffTest42,col=Col,plot_GOF=TRUE)
|      > 
|      > #in 3D the interaction between X3 and X reveals itself completely
|      > show3d(ffTest42,3:4,col=Col,plot.rgl=list(size=5),sortByImportance=FALSE) 
|      Error in rgl.open(useNULL) : rgl.open failed
|      Calls: show3d ... plot3d.default -> next3d -> .check3d -> open3d -> rgl.open
|      Execution halted 
| Flavor: r-release-osx-x86_64-mavericks

Yes, I see lots of that on Linux too as the tests run 'headless' without a
controlling terminal.

| R-package-devel at r-project.org mailing list
| https://stat.ethz.ch/mailman/listinfo/r-package-devel

http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org

More information about the R-package-devel mailing list