R: Plotting a 3D surface from x, y, z

If your x and y coords are not on a grid then you need to interpolate your x,y,z surface onto one. You can do this with kriging using any of the geostatistics packages (geoR, gstat, others) or simpler techniques such as inverse distance weighting. I’m guessing the ‘interp’ function you mention is from the akima … Read more

Installing rgl on Ubuntu and Mac: X11 not found

On Ubuntu 16.04 and 18.04, you might get this issue when trying to install rgl from CRAN: checking for X… no configure: error: X11 not found but required, configure aborted. ERROR: configuration failed for package ‘rgl’ Credit is due to this blog which solved my problems at installing rgl: http://solaimurugan.blogspot.ca/2015/09/3d-data-visualization-using-r-configure.html In case the link above … Read more

How do I install the latest version of rgl?

(This has been updated since rgl moved from R-forge to Github). The simplest way is to install from Github, using devtools::install_github(“dmurdoch/rgl”) This installs a version that may be a few hours old. It does require that you have the tools for a source install; rgl has a lot of code that needs to be compiled. … Read more