任何人都可以帮助我为什么会出现此错误?试图在闪亮的应用程序中运行 下面的代码
`
server <- function(input, output)
{# Regression output b1 <- reactive({(sum((input$outcome -
mean(input$outcome)) * (input$indepvar -
mean(input$indepvar))))/sum((input$outcome - mean(input$outcome)) ^ 2)})b0 <- reactive({mean(input$indepvar) - b1 * mean(input$outcome)})
obj <- reactive({function (r)
{fn <- function (b0, b1)
{return (sum(input$indepvar - (b0 + b1 * input$outcome)) ^ 2)}
return (fn(r[1], r[2]))}})
ubound <- reactive({c(2, 1)})
lbound <- reactive({c(0, 0)})
output$summary <- renderPrint({ga_search <- ga(type = "real-valued",fitness = function (x) -obj(x),lower = lbound,upper = ubound,popSize = 50)
summary(ga_search) `
任何帮助表示赞赏