Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ui.r
- navbarPage(
- "Application",
- tabPanel("General",
- sidebarLayout(
- sidebarPanel(
- uiOutput("tex2"),
- uiOutput("book3")
- ),
- mainPanel(
- DT::dataTableOutput("hot3")
- )
- )))
- #server.r
- library(shiny)
- library(DT)
- server <- function(input, output,session) {
- output$tex2<-renderUI({
- numericInput("text2","#tests",
- value = 1,
- min=1
- )
- })
- output$book3<-renderUI({
- selectInput("bk3",
- "Change Name",
- choices=(paste("Test",1:input$text2)))
- })
- rt1<-reactive({
- data.frame(
- Label=paste("Test",1:input$text2),
- stringsAsFactors = FALSE)
- })
- output$hot3 <-DT::renderDataTable(
- rt1(),
- editable = TRUE
- )
- }
Add Comment
Please, Sign In to add comment