Aizen Aizen - 1 year ago 111
R Question

Reading eventreactive input from inputtextarea in shiny R

I am using a textareaInput for reading data in my dashboard. I tried to covert it into a vector based on the gsub option below.but when I execute this it returns the output as all rows as false. I have data in rdreport data frame with column as Var - in which the values are Mark, Mark1, Mark2 etc.

subset_dataset <-
eventReactive(input$go, {(rdreport$Var %in% (paste0('c("',(gsub('[\r\n]', '","', input$txt)),'")')))})

(paste0('c("',(gsub('[\r\n]', '","', input$txt)),'")'))
--> In this portion I am trying to convert the textareaInput to a vector. Input to textarea is given as Mark and Mark1 separated by \n. But the code is not working.

Can somebody help on this?

Answer Source

Dont know where problem in your code

try it

textAreaInput("txt",label = ""),



  DF=c("A","B","CC","DT","HJKH") # TEST DATA
  subset_dataset <-eventReactive(input$go, {
    DF %in% unlist(strsplit(x =input$txt,split = '[\r\n]' ))


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download