[R] The rgl package update may affect your scripts

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Thu Jan 19 11:27:04 CET 2023


To all users of the rgl package:

CRAN has just accepted an update of rgl to version 1.0.1.

This release deprecates a number of functions which have been in the 
package for a very long time, and this may affect your scripts.  Here 
are the news items about it:

  * The long promised deprecations of the rgl.* functions have happened. 
Now deprecated: rgl.abclines, rgl.bbox, rgl.bg, rgl.clear, 
rgl.clipplanes, rgl.close, rgl.light, rgl.lines, rgl.linestrips, 
rgl.material, rgl.open, rgl.planes, rgl.points, rgl.quads, rgl.select3d, 
rgl.set, rgl.setAxisCallback, rgl.sprites, rgl.surface, rgl.texts, 
rgl.triangles, and rgl.viewpoint.

  * A vignette “Deprecating the rgl.* interface” has been added.

  * Also deprecated: elementId2Prefix, writeWebGL

I have notified all the CRAN and Bioconductor package maintainers who 
were using the old functions and have helped them to make updates, but I 
expect it will be a while before the updates are all published on CRAN. 
If you use the deprecated functions in your own scripts, or you use one 
of those packages before the updates are available, you will see 
warnings like this:

   Warning message:
   'rgl.points' is deprecated.
   Use 'points3d' instead.
   See help("Deprecated")

Those are just warnings:  the rgl.points function (and all the others) 
are still there with no changes except that they now issue these warnings.

In most cases, using the suggested replacement will just work with no 
other changes needed.  The exceptions to this that I know about are 
rgl.surface() and rgl.open(), where you might find the new defaults for 
colours and projections aren't what you want.  If that happens, feel 
free to contact me for advice on how to obtain the previous behaviour 
using the new functions.

For more details see the new vignette (online here: 
https://dmurdoch.github.io/rgl/articles/deprecation.html) for more 
details about the changes.

Duncan Murdoch



More information about the R-help mailing list