当前位置:  开发笔记 > 编程语言 > 正文

r-tag $ head中的错误:“ closure”类型的对象不可子集化

如何解决《r-tag$head中的错误:“closure”类型的对象不可子集化》经验,为你挑选了1个好方法。



1> Batanichek..:

两个包装具有相同功能的问题。

揭露功能tagshinyunloadNamespace("shiny")所有的包后,再次负荷require(shiny)

效果很好。如果您需要不闪亮的标签::

library(devtools) 
        library(git2r)
    unloadNamespace("shiny")
        library(shiny)
        library(rCharts)
        library(dplyr)
        library(rjson) 
library(rNVD3)




        league_desc <- c("Premier League","Serie A","Bundesliga","La Liga")

        shinyUI( fluidPage(
          headerPanel(h1('Football Statistics', align = "center")
                      , h2('Data on the 4 main european football leagues. Period 2011 - 2015', align = "center")),
          sidebarPanel( h4('Selection Parameters', align = "center"),
                        radioButtons("League_RB", "Select League", league_desc, selected = "Premier League", inline = FALSE, width = NULL),
                        radioButtons("Year_RB", "Select Season", c(2011:2015), selected = 2011, inline = FALSE, width = NULL), 
                        sliderInput("matchdays", "Matchdays:", min = 1, max = 38, value = c(1, 38)) ),
          mainPanel( tabsetPanel(
            tabPanel(p(icon("line-chart"), "Charts"),
                     h4('Standings', align = "center") ,

                     showOutput(outputId = "chart1"),
                     h4('Shots & Goals', align = "center"),

                     showOutput("chart2"), h4('Relationship Shots vs Goals', align = "center"), 
                     showOutput("chart3"), h4('Fouls', align = "center"),
                     showOutput("chart4")
                    ), 
            tabPanel(p(icon("table"), "Full Data"), dataTableOutput("dataTable")),
            tabPanel(p(icon("cogs"), "Regression"), h4('Predict Number of Goals based on Number of Shots on Target', align = "left"), 
                     numericInput("sot","1) Expected Number of Shots on Target",value=0,min=0), 
                     radioButtons("League_Pred_RB", "2) Select League for which you want to predict", league_desc, selected = "Premier League", inline = FALSE, width = NULL), 
                     h5("3) Click the button to generate the prediction"), 
                     actionButton("predButton", "Generate Prediction"),
                     h5('4) Number of Goals Predicted, based on Historical Data'),
                     verbatimTextOutput("pred_goals"),
                     br(),
                     h4('Average Number of Goals, SOT and Regression Coefficients in the period 2011 - 2015', align = "left"),
                     dataTableOutput("regressionTable") ) ) ) ) )

推荐阅读
ifx0448363
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有