I normally don't have a problem viewing plots in RStudio (version 1.0.44), but when I try to view a 3D plot created with the "rgl" package, nothing appears in my RStudio plot viewer.
I am able to plot without a problem the plot(cars) scatterplot.
This is the code I am using:
install.packages("rgl")
library(rgl)
plot3d(iris[1:3]) # Nothing appears in RStudio plot viewer
plot(cars) # The cars scatterplot appears in my RStudio plot viewer
dev.off()
Any ideas why this might be so and what else I should try? I am not receiving any errors when I run plot3d(iris[1:3]). I checked with head(iris[1:3]) to make sure I was loading in the iris data correctly. I've also tried changing the plot margins:
par(mar=c(4,4,4,4)
Thank you
Documentation FTW