diff --git a/inst/nimo/src/query_gbif_occ_data.R b/inst/nimo/src/query_gbif_occ_data.R index 4d15cab..069deb6 100644 --- a/inst/nimo/src/query_gbif_occ_data.R +++ b/inst/nimo/src/query_gbif_occ_data.R @@ -72,6 +72,7 @@ query_occ <- function(query_params) { "recordedBy", "institutionCode", "samplingProtocol", "habitat", "license") absent_col <- basic_col[!basic_col %in% occdt_col[which(occdt_col %in% basic_col)]] + if (length(absent_col) > 0) { df <- data.frame(matrix(NA, nrow = nrow(occurrences), ncol = length(absent_col))) colnames(df) <- absent_col @@ -101,6 +102,7 @@ query_occ <- function(query_params) { } markdown_text <- sub("accessed via GBIF.org", "accessed via GBIF.org using nimo", paste(metadata_list)) } + Sys.sleep(input$sleep_time) # Sleep } diff --git a/inst/nimo/ui.R b/inst/nimo/ui.R index 1ff2d76..b076382 100644 --- a/inst/nimo/ui.R +++ b/inst/nimo/ui.R @@ -632,6 +632,7 @@ nimo_body <- shinydashboard::dashboardBody( shinyWidgets::panel( tagList(numericInput("set_seed", "Set seed", value = 123, min = 0, step = 1), numericInput("sys_timeout", "Timeout (min)", value = 5, min = 1, step = 0.1), + numericInput("sleep_time", "Sleep time (sec)", value = 0.5, min = 0.01, step = 0.1), actionButton("save_config", "Save change", style = bttn_primary_style)) ) )