KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have 6 parameters that the user can change values for. These are our 6 inputs. I want to create an output value that takes those 6 inputs and computes our value of interest given a number of related equations in a function. Here is what I have in my UI... library(shiny) # Define UI for slider demo application shinyUI(pageWithSidebar( # Application title headerPanel("# Header Title Goes Here"), # Sidebar with sliders that demonstrate various available options sidebarPanel( # Simple integer interval sliderInput("u1", "Name:", min=0, max=10000, value=10000), #There are 6 slider inputs... ), # Show a table summarizing the values entered mainPanel( tableOutput("values"), uiOutput("focal")) ) ) Here is what I have in my server.R... library(shiny) shinyServer(function(input, output) { # Reactive expression to compose a data frame containing all of the values sliderValues <- reactive({ # Compose data frame data.frame( Name = # Names of my 6 parameters, Value = # inputs based on my 6 values by `input$value`, stringsAsFactors=FALSE) }) f <- renderText({function(r1, r2, r3, d1, d2, u1) #these are my 6 values { #List of equations that compute f based on the 6 values } }) # Show the values using an HTML table output$values <- renderTable({ sliderValues() }) # Show the final calculated value output$focal <- renderText({ f }) }) I keep getting... Error: argument 1(type 'closure') cannot be handled by 'cat' and many other errors. I just don't how to transfer the updated user inputs of the 6 parameters to my function and spit that function back out in the output area on the Shiny html page. Any help would be greatly appreciated!! Thanks!
Tags (comma-separated)
Save Edits
Cancel