【问题标题】:Shiny issue: Subscript out of bounds闪亮的问题:下标越界
【发布时间】:2016-12-24 13:55:17
【问题描述】:

我开发了一个闪亮的应用程序,它可以在我的笔记本电脑上完美运行,但是当我部署到服务器时,我得到“错误:下标越界”。问题似乎在这些 线条

ui.R

sidebarPanel(
selectInput('matches2TeamFunc', 'Select function', IPLMatches2TeamsFuncs),
selectInput('match2', 'Select matches', IPLMatches2Teams,selectize=FALSE, size=20),
uiOutput("selectTeam2")                                   
 ),

服务器.R

 output$IPLMatch2TeamsPlot <- renderPlot({  
    m <- strsplit(as.character(input$match2),"-")
    print("Hello")
    t1 <- m[[1]][1]
    t2 <- m[[1]][2]
    print(length(m))

    teams <- c(t1,t2)
    print(teams)

    # Load all IPL batsmen
    output$selectTeam2 <- renderUI({ 
        selectInput('team2', 'Choose team',choices=teams,selected=input$team2)
    })

    otherTeam = setdiff(teams,input$team2)

    print("Next")
    print(otherTeam)
    print(input$team2)
    analyzeIPLMatches2Teams(input$match2,input$matches2TeamFunc,input$team2,otherTeam)

其中 input$match2 = "加尔各答骑士队-拉贾斯坦皇家队-allMatches"。

我想要 t1 = ""加尔各答骑士团" & t2 = "Rajasthan Royals"

本地运行没有问题

任何关于如何解决此问题的建议将不胜感激

【问题讨论】:

    标签: r shiny


    【解决方案1】:

    请忽略这个。该错误可能是由于变量问题。这可以关闭。我已经修好了。

    【讨论】:

      猜你喜欢
      • 2019-05-07
      • 2015-01-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-12
      • 1970-01-01
      • 2017-07-06
      • 1970-01-01
      相关资源
      最近更新 更多