如何在闪亮的情况下显示rChart散点图?

时间:2015-08-03 16:58:52

标签: r

我正试图在其中一个标签中为散点图创建一个闪亮的rChart ..以下是ui.R中的代码片段

  mainPanel( 
    tabsetPanel(
      tabPanel("Tab 1","Type of chart",textOutput("caption"),"Chart", plotOutput("mpgPlot")),
      tabPanel("Tab 2","Type of chart",showOutput("RPlot", "Highcharts"))
    )
  )

以下是server.R代码

  output$RPlot <- renderChart({
    p <- nPlot(mpg ~ wt, group = 'cyl', data = mtcars, type = 'scatterChart')
    return(p)
  })

代码没有给出错误但没有显示rChart ..

sessionInfo()
R version 3.2.0 (2015-04-16)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ggplot2_1.0.1 rCharts_0.4.2 shiny_0.12.1 

loaded via a namespace (and not attached):
 [1] minqa_1.2.4         BradleyTerry2_1.0-6 bitops_1.0-6        lattice_0.20-31     stringr_0.6.2      
 [6] gtools_3.5.0        parallel_3.2.0      pbkrtest_0.4-2      caret_6.0-52        SparseM_1.6        
[11] xtable_1.7-4        labeling_0.3        Rcpp_0.11.6         car_2.0-25          plyr_1.8.3         
[16] httr_0.6.1          tools_3.2.0         MASS_7.3-40         swirl_2.2.21        RCurl_1.95-4.7     
[21] nlme_3.1-120        R6_2.0.1            scales_0.2.4        nnet_7.3-9          lme4_1.1-8         
[26] digest_0.6.8        gtable_0.1.2        mime_0.3            Matrix_1.2-0        foreach_1.4.2      
[31] rstudioapi_0.3.1    whisker_0.3-2       reshape2_1.4.1      htmltools_0.2.6     rpart_4.1-9        
[36] munsell_0.4.2       grid_3.2.0          colorspace_1.2-6    httpuv_1.3.2        quantreg_5.11      
[41] nloptr_1.0.4        splines_3.2.0       yaml_2.1.13         stats4_3.2.0        testthat_0.9.1     
[46] mgcv_1.8-6          proto_0.3-10        iterators_1.0.7     codetools_0.2-11    jsonlite_0.9.16    
[51] brglm_0.5-9         rstudio_0.98.1103   RJSONIO_1.3-0 

如何纠正这个问题?

0 个答案:

没有答案
相关问题