Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rglIds

RGL id values


Description

All objects in an RGL scene have a numerical id. These ids are normally stored in vectors of class c("rglIds", "numeric"), which will also have class "rglHighlevel" or "rglLowlevel" depending on whether a high level function like plot3d or persp3d, or a low level function created the objects.

Usage

rglId(ids = integer())
lowlevel(ids = integer())
highlevel(ids = integer())
## S3 method for class 'rglId'
print(x, 
      rglwidget = getOption("rgl.printRglwidget", FALSE),
      ...)

Arguments

ids

A vector of object ids.

x

An "rglId" object to print.

rglwidget

Whether to create and print an RGL widget. If false, nothing is printed.

...

Other arguments which will be passed to rglwidget if it is used.

Details

These functions and classes are intended to allow RGL scenes to be automatically displayed in R Markdown documents. See setupKnitr for details on enabling auto-printing.

Note that all objects in the current scene will be printed by default, not just the ids in x. (One reason for this is that lights are also objects; printing objects without lights would rarely make sense.)

Value

Objects of class "rglId", c("rglHighlevel", "rglId", "numeric") or c("rglLowlevel", "rglId", "numeric") for rglId, lowlevel or highlevel respectively.

Author(s)

Duncan Murdoch

Examples

x <- matrix(rnorm(30), ncol = 3, dimnames = list(NULL, c("x", "y", "z")))
p <- plot3d(x, type = "s")
str(p)
if (interactive() || in_pkgdown_example())
  print(p, rglwidget = TRUE)

rgl

3D Visualization Using OpenGL

v0.106.8
GPL
Authors
Duncan Murdoch [aut, cre], Daniel Adler [aut], Oleg Nenadic [ctb], Simon Urbanek [ctb], Ming Chen [ctb], Albrecht Gebhardt [ctb], Ben Bolker [ctb], Gabor Csardi [ctb], Adam Strzelecki [ctb], Alexander Senger [ctb], The R Core Team [ctb, cph], Dirk Eddelbuettel [ctb], The authors of Shiny [cph], The authors of knitr [cph], Jeroen Ooms [ctb], Yohann Demont [ctb], Joshua Ulrich [ctb], Xavier Fernandez i Marin [ctb], George Helffrich [ctb], Ivan Krylov [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.