0

So what I want to do is take the column "conc" from chlorideframe, divide it by the value cc0valueschloride, and then stick it back into a new dataframe cc0chloride. I have some reactive value, cc0chloride which I want to be a dynamic dataframe.

cc0chloride<-reactiveValues(conc=0)

I want to divide a column in the dataframe called "conc" with this value I define here cc0valueschloride

cc0valueschloride<-reactive({cindat()[1,2]})

observeEvent(input$run_button, {
    req(chlorideframe())
    cc0chloride$conc<-chlorideframe()$conc/cc0valueschloride()
  })

But this only returns the one value in the column, instead of 200. I'm not sure why this doesn't divide the entire column conc and store it into a new list.

David_Cola
  • 21
  • 5
  • 2
    It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. – MrFlick Nov 29 '22 at 16:25
  • 1
    `[1,2]` means always the first row of second column. If you want to do whole column, `[, 2]` – lz100 Nov 30 '22 at 20:33

0 Answers0