I have a simple shiny app in which I use a `numericInput()` to set the number of the rows of the dataframe.Then I use a `selectInput()` "Label" to select a Label from the datatable and then change its name with textInput() "Change to". The problem is that every time I try to change the name of a new Label using the `textInput()` the previous Label that I modified returns to default name. I believe this is happening because my `DF` is created inside a reactive function and cannot accept the subsetting. What I probably need is using `reactiveValues()` in order to store the previous values but I do not know exactly how to use it so I use `reactive()` here in order to display a working example.

```
library(shiny)
library(DT)

ui <- navbarPage(
  "Application",
  tabPanel("General",
           sidebarLayout(
             sidebarPanel(
               uiOutput("tex2"),
               uiOutput("book3"),
               uiOutput("book6")
             ),
             mainPanel(
               DT::dataTableOutput("hot3")
             )
           )))
#server.r
server <- function(input, output,session) {

  output$tex2<-renderUI({
    numericInput("text2", "#tests", value = 1, min=1)
  })

  output$book3<-renderUI({
    selectInput("bk3", "Label",  choices=(paste("Test",1:input$text2)))
  })

  output$book6<-renderUI({
    textInput("bk6", "Change to", value=NULL)
  })
  rt4<-reactive({
    DF <- data.frame(
      Test=paste(1:input$text2),
      Label=paste("Test",1:input$text2),
      stringsAsFactors = FALSE)
    if(!is.null(input$bk6) && input$bk6!=""){
      DF[DF$Label==isolate(input$bk3), "Label"] <- input$bk6
    }
    {
    DF
    }

  })

  output$hot3 <-DT::renderDataTable(
    rt4(),
    rownames= FALSE

  )
}

```