Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 206278

Why shiny didn't call local function in server session?

$
0
0

Suppose I have a local function:

getres<-function(x, y){
   x^2-y
}

Then I have shiny::server:

server <- function(input, output) {
  reslst<-reactive({
    getres(input$x, input$y)
  })

  output$result <- renderPrint({
    reslst
  })
}

When I execute the code, it reported no object reslst which means the local function getres hasn't run at all. Some suggestions?


Viewing all articles
Browse latest Browse all 206278

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>