textFunctionInput {ggplotAssist} | R Documentation |
UI of textFunction shiny module
Description
UI of textFunction shiny module
Usage
textFunctionInput(id)
Arguments
id |
A string |
Examples
library(ggplotAssist)
library(shiny)
# Only run examples in interactive R sessions
if(interactive()){
ui=fluidPage(
textFunctionInput("text"),
textOutput("text")
)
server=function(input,output,session){
rv=reactiveValues()
rawData=read.csv("data-raw/setting.csv",stringsAsFactors = FALSE)
settingData=splitData(rawData,"setting")
rv$argList<-list(label="text",mode="text",value="element_text()",choices=NULL,width=200,
bg="lightcyan",placeholder="")
result=callModule(textFunction,"text",argList=reactive(rv$argList),
editCode=reactive(TRUE),settingData=reactive(settingData))
output$text=renderText({
result()
})
}
shinyApp(ui,server)
}
[Package ggplotAssist version 0.1.3 Index]