Description Usage Arguments Examples
A shiny module that read a delimited file (with read_delim
) from a path and a filename. It is more a internal module than a module that works on itself.
1 2 3 4 | mod_loading_optionsInput(id)
mod_loading_options(input, output, session, path, filename,
coltypes = cols(.default = col_character()))
|
id |
shiny id |
input |
internal |
output |
internal |
session |
inernal |
path |
reactive string value. The path to the directory where the file is |
filename |
reactive string value. Name and extension of the file to read |
coltypes |
see |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | library(shiny)
if (interactive()) {
ui <- fluidPage(
h4("Choose a path"),
textInput("path", value = getwd(), label = NULL),
h4("Choose a filename (do not forget the extension)"),
textInput("filename", value = "", label = NULL),
h4("The module goes from here............................"),
mod_loading_optionsInput("loadfile"),
h4("..........................................to here"),
h4("You can display the result"),
tableOutput("data")
)
server <- function(input, output, session) {
data <- callModule(mod_loading_options,"loadfile", path = reactive(input$path),
filename = reactive(input$filename))
output$data <- renderTable(data())
}
shinyApp(ui, server)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.