0

I'm trying to substitute a value in a table with a value from an equation. I've been unable to succeed, maybe because of my limited knowledge of R Shiny

Here is my code. I can create UI from where I get:

input$a
input$b
input$c

A combination of these 3 is my key with + in between

inputkey = reactive({paste0(input$a, "+", input$b, "+", input$c)})

I have a CSV Table in Global.R, eqn. I want to use the "key" to look for a value in eqn:

dynamictable <- renderDataTable({subset(eqn, eqn$key == inputkey)

And look for the value in another column: valueofx1 = with(dynamictable , c(dynamictable $valuecolumn)

output$ctPred <- renderText({paste0("Prediction = ", input$Effort+valueofx1)})      

valueofx1 will dynamically change based on input$a, input$b, input$c combinations in input

Can someone help me to solve this?

Werner Hertzog
  • 2,002
  • 3
  • 24
  • 36
Arul
  • 1
  • 1
  • 1
    You should try to make a more complete [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). you shound't use `$` with subset and you need to use `()` to get reactive values.: `subset(eqn, key == inputkey())` – MrFlick May 18 '16 at 05:20
  • WOW, that helps, also I replaces subset with eqn[eqn$Key == paste0(input$a, "+", input$b, "+", input$c), 5] – Arul May 18 '16 at 06:05

0 Answers0