Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Appsilon/shinynlq
https://github.com/Appsilon/shinynlq
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/Appsilon/shinynlq
- Owner: Appsilon
- Created: 2023-08-17T10:19:55.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-15T05:10:45.000Z (11 months ago)
- Last Synced: 2023-12-15T06:27:51.709Z (11 months ago)
- Language: R
- Size: 15.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-shiny-extensions - shinynlq - Natural language queries (NLQs) for Shiny as a bslib custom component. (UI Components / Special Input)
README
# shinynlq
Natural language queries for shiny as a `bslib` [custom component](https://rstudio.github.io/bslib/articles/custom-components/index.html).
- Needs bootstrap v5.
Install:
```r
remotes::install_github("alexverse/shinynlq")
```Example:
```r
library(shiny)
library(shinynlq)ui <- bslib::page(
nlq_container(
"My name is",
nlq_input("nlq_1", c("Max", "Elizabeth")),
"and picked",
nlq_input("nlq_2", letters)
),
textOutput("text")
)# Define server logic required to draw a histogram
server <- function(input, output) {
bslib::bs_themer()
output$text <- renderText({
paste(input$nlq_1, "picked", input$nlq_2)
})
}# Run the application
shinyApp(ui = ui, server = server)
```