Juste un court instant il y a ma question sur la façon d'intégrer un RGL en brillant a été répondu par Mike, mais nous semble avoir trébuché dans une autre question,RGL en R Shiny ne tourne pas sur le bouton gauche de la souris
C'est l'exemple de code:
library(rgl)
library(car)
library(shiny)
cars$time <- cars$dist/cars$speed
ui <- fluidPage(
hr("how do we get the plot inside this app window rather than in a popup?"),
rglwidgetOutput("plot", width = 800, height = 600)
)
server <- (function(input, output) {
output$plot <- renderRglwidget ({
rgl.open(useNULL=F)
scatter3d(x=cars$speed, y=cars$dist, z=cars$time, surface=FALSE, ellipsoid = TRUE)
rglwidget()
})
})
shinyApp(ui = ui, server = server)
Changer rgl.open(useNULL=F)
-rgl.open(useNULL=T)
arrêtera la fenêtre contextuelle de montrer, mais dans les deux cas, la RGL dans la page brillante fait ZOOM, mais ne tourne pas.
Il semble que les registres de clic droit de la souris et des œuvres, en un clic gauche de la souris ne reconnaît pas ....
> sessionInfo()
R version 3.3.3 (2017-03-06)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
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] shiny_1.0.0 car_2.1-4 rgl_0.97.0
loaded via a namespace (and not attached):
[1] Rcpp_0.12.9 knitr_1.15.1 magrittr_1.5 splines_3.3.3 MASS_7.3-45 xtable_1.8-2 lattice_0.20-34
[8] R6_2.2.0 minqa_1.2.4 tools_3.3.3 nnet_7.3-12 pbkrtest_0.4-7 parallel_3.3.3 grid_3.3.3
[15] nlme_3.1-131 mgcv_1.8-17 quantreg_5.33 MatrixModels_0.4-1 htmltools_0.3.5 yaml_2.1.14 lme4_1.1-13
[22] digest_0.6.11 Matrix_1.2-8 nloptr_1.0.4 htmlwidgets_0.8 mime_0.5 SparseM_1.77 jsonlite_1.2
[29] httpuv_1.3.3
Aiderait probablement si vous ajoutiez la sortie de 'sessionInfo()' à la publication. –