I'm trying to build a flexdashboard which includes an rgl widget to display some multivariate data. The problem is identical to this post, where the widget I'm trying to create doesn't appear in the final document. Unfortunately the comments within the post didn't help me with my solution, (I re-installed the rgl package from the forge repo) and there weren't any answers posted. I've also looked at this post from Duncan himself, and wasn't able to implement a solution with what was said there either. I don't have the reprex package, nor have I used it before, and I'm a little pressed for time, so here's my best attempt at a reprex with the formatting I'm attempting to use.
---
title: "3d widget"
output: html_document
knitr::opts_chunk$set(echo = TRUE)
library(rgl)
with(mtcars, plot3d(x = mpg,
y = disp,
z = hp,
col = cyl,
size = 1,
type = "s",
axes = FALSE,
xlab = "",
ylab = "",
zlab = ""))
rglwidget()
When I knit the .rmd file, I don't see any errors, nothing obviously appears to go wrong during knit. And when I inspect the .html file I find the rglwidget element within the html code, but the space where it should be is still blank. The widget device will show up in the console if I run the code outside of markdown though, just not in the final document. This doesn't work with flexdashboard output either.
Here's my session info. I'm using 32-bit R because the data is coming from an access database and I need to keep architecture compatible:
R version 3.6.0 (2019-04-26)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 10 x64 (build 17763)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] rgl_0.100.51
loaded via a namespace (and not attached):
[1] Rcpp_1.0.3 digest_0.6.20 later_0.8.0 mime_0.7
[5] R6_2.4.0 jsonlite_1.6 xtable_1.8-4 magrittr_1.5
[9] evaluate_0.14 rlang_0.4.4 miniUI_0.1.1.1 promises_1.0.1
[13] rmarkdown_2.1 webshot_0.5.1 tools_3.6.0 manipulateWidget_0.10.0
[17] htmlwidgets_1.3 crosstalk_1.0.0 shiny_1.3.2 httpuv_1.5.1
[21] xfun_0.7 yaml_2.2.0 compiler_3.6.0 htmltools_0.4.0
[25] knitr_1.28