Skip to contents

This Shiny module provides a user interface for uploading a `.csv` file containing speaker data for VOX Analysis. It enables users to import external data for analysis, with options to modify the speaker data

Usage

mod_upload_data_set_server(id, ind_add_new_data = FALSE)

mod_upload_data_set_ui(id)

Arguments

id

The namespace `id`, used to uniquely identify Shiny modules and UI components within the VOX Analysis package.

ind_add_new_data

Logical (`TRUE` or `FALSE`): Indicates whether the user intends to manually enter new data. Setting this to `TRUE` triggers the inclusion of the `mod_speaker_data_entry` module, enabling manual data entry by the user.

Examples

if (interactive()) {
  # Load example speaker data

  # Define the UI with the file upload module
  ui <- page(
    useShinyjs(),
    mod_upload_data_set_ui("upload")
  )

  # Set up the server to handle file uploads
  server <- function(input, output, session) {
    mod_upload_data_set_server(
      "upload",
      ind_add_new_data = TRUE
    )
  }

  # Run the Shiny app
  shinyApp(ui, server)
}

# Alternative: Run a pre-configured example app for file upload
if (interactive()) {
  run_example_upload_data_set_app(ind_add_new_data = TRUE)
}