RShiny不会将任何结果输出到服务器。 '服务器错误(...):未使用的参数(输出=列表( ,函数(x)x))'] >> 我的Rshiny应用程序不会放我们想要的相关图,我不确定为什么。运行代码时出现此错误。 Warning: Error in server: unused argument (output = list(<environment>, function (x) x)) [No stack trace available] Error in server(...) : unused argument (output = list(<environment>, function (x) x)) 这是我正在使用的代码: library(shiny) library(shinydashboard) combined1 = read.csv("combined.csv", stringsAsFactors=F, na.strings=c(NA,"NA"," NA", "na")) ui <- dashboardPage( dashboardHeader(title = "NBA Draft"), dashboardSidebar(), dashboardBody( box(plotOutput("correlation_plot"), width = 8), box( selectInput("features", "Features:", c("Pts", "Ast", "Trb", "WS.48")), width = 4 ) ) ) server <- function(input, outout){ outout$correlation_plot <- renderPlot({ plot(combined1$Pk, combined1[[input$Features]], xlab = "Pk", ylab = "Features") }) } shinyApp(ui, server) 我不知道为什么会收到此错误,有人可以帮我吗? 我的Rshiny应用程序不会放我们想要的相关图,我不确定为什么。运行代码时出现此错误。警告:服务器错误:未使用的参数(输出= list( 尝试一下: library(shiny) library(shinydashboard) combined1 = read.csv("combined.csv", stringsAsFactors=F, na.strings=c(NA,"NA"," NA", "na")) ui <- dashboardPage( dashboardHeader(title = "NBA Draft"), dashboardSidebar(), dashboardBody( box(plotOutput("correlation_plot"), width = 8), box( selectInput("features", "Features:", c("Pts", "Ast", "Trb", "WS.48")), width = 4 ) ) ) server <- function(input, output){ output$correlation_plot <- renderPlot({ plot(combined1$Pk, combined1[[input$Features]], xlab = "Pk", ylab = "Features") }) } shinyApp(ui, server) 该变量应称为输出而不是outout

问题描述 投票:0回答:1

我的Rshiny应用程序不会放我们想要的相关图,我不确定为什么。运行代码时出现此错误。

Warning: Error in server: unused argument (output = list(<environment>, function (x) x))
[No stack trace available]
Error in server(...) : 
unused argument (output = list(<environment>, function (x) x))

这是我正在使用的代码:

library(shiny)
library(shinydashboard)
combined1 = read.csv("combined.csv", stringsAsFactors=F, na.strings=c(NA,"NA"," NA", "na"))



ui <- dashboardPage(
dashboardHeader(title = "NBA Draft"),
dashboardSidebar(),
dashboardBody(
  box(plotOutput("correlation_plot"), width = 8),
  box(
    selectInput("features", "Features:",
              c("Pts", "Ast", "Trb",
                "WS.48")), width = 4
  )
)
)



server <- function(input, outout){
  outout$correlation_plot <- renderPlot({
    plot(combined1$Pk, combined1[[input$Features]],
         xlab = "Pk", ylab = "Features")
 })

}


shinyApp(ui, server)

我不知道为什么会收到此错误,有人可以帮我吗?

我的Rshiny应用程序不会放我们想要的相关图,我不确定为什么。运行代码时出现此错误。警告:服务器错误:未使用的参数(输出= list(<...>

r server shinydashboard server-error
1个回答
0
投票

尝试一下:

library(shiny)
library(shinydashboard)
combined1 = read.csv("combined.csv", stringsAsFactors=F, na.strings=c(NA,"NA"," NA", "na"))



ui <- dashboardPage(
dashboardHeader(title = "NBA Draft"),
dashboardSidebar(),
dashboardBody(
  box(plotOutput("correlation_plot"), width = 8),
  box(
    selectInput("features", "Features:",
              c("Pts", "Ast", "Trb",
                "WS.48")), width = 4
  )
)
)



server <- function(input, output){
  output$correlation_plot <- renderPlot({
    plot(combined1$Pk, combined1[[input$Features]],
         xlab = "Pk", ylab = "Features")
 })

}


shinyApp(ui, server)
© www.soinside.com 2019 - 2024. All rights reserved.