Runing an interactive function with while loop on shiny

I am trying to create a simple text listing UI on the shiny dashboard. For this, I made an R function, which needs to store each text inputs to store in a list.

readtasks <- function() {

  df <- list()
  while(TRUE) {
    tasks <- readline(prompt="type your tasks: ")
    # stop reading if no text was typed in
    if (tasks == '')

    # add the read data to the bottom of the list
    df <- append(df,tasks)

The function works good for my needs, but when it comes to shiny it shows so many errors. I am eagerly want to know, how this while loop can efficiently implement to shiny. I search a lot in google and StackOverflow about this.if possible please give me an example.

Thank you


This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.