Search code examples
r3drgl

Explorting an RGL object for use in WebGL


I've got a 3D PCA plot using the pcaplot method from AffyCoreTools in R http://rgm3.lab.nig.ac.jp/RGM/R_rdfile?f=affycoretools/man/plotPCA.Rd&d=R_BC

I'd like to capture this object and my overall aim is to use that dynamic, interactive plot in a web page (potentially rendering with webGL), but for the moment I'm stuck in actually capturing the Object that pcaplot() is creating.

I've tried foo <- pcaplot() which yNULL object.

Any suggestions would be greatly appreciated.


Solution

  • You should just have to put writeWebGL() with a file path to where you want the output placed prior to calling pcaplot(). You didn't include any data or code which would allow me to try it out first, but assuming the plotting function is calling rgl in a friendly way, then writeWebGL should do the trick.