Commit ea1964e2 authored by Dorchies David's avatar Dorchies David
Browse files

fix: object 'rulesets' not found

parent f38080f6
Pipeline #22541 passed with stage
in 2 minutes and 54 seconds
......@@ -10,13 +10,15 @@ Imports:
shiny,
processx,
attempt,
DT,
glue,
htmltools,
shinydashboard,
shinydashboardPlus,
RSQLite,
dbplyr
dbplyr,
dplyr,
ggplot2,
rvgest
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.1
......@@ -27,6 +29,5 @@ Suggests:
testthat,
knitr,
rmarkdown,
zoo,
dplyr
zoo
VignetteBuilder: knitr
......@@ -7,11 +7,10 @@
#' @noRd
#'
#' @importFrom shiny NS tagList
#' @importFrom rvgest lakes rulesets
mod_instant_risk_overview_ui <- function(id){
ns <- NS(id)
choices <- seq(length(rulesets$rules))
names(choices) <- paste0(choices, ". ", rulesets$rules)
choices <- seq(length(rvgest::rulesets$rules))
names(choices) <- paste0(choices, ". ", rvgest::rulesets$rules)
tagList(
fluidRow(
column(width = 6,
......@@ -28,13 +27,13 @@ mod_instant_risk_overview_ui <- function(id){
column(width = 6,
dateInput(ns("date"), "Date:", value = Sys.Date()))),
fluidRow(
lapply(seq.int(nrow(lakes)), function(i) {
lapply(seq.int(nrow(rvgest::lakes)), function(i) {
column(width = 3,
numericInput(ns(paste0("V", i)),
lakes$name[i],
round(getObjectiveStorage()[lakes$name[i]]),
min = lakes$min[i],
max = lakes$max[i]))
rvgest::lakes$name[i],
round(getObjectiveStorage()[rvgest::lakes$name[i]]),
min = rvgest::lakes$min[i],
max = rvgest::lakes$max[i]))
})
),
# tableOutput(ns("table"))
......@@ -51,19 +50,6 @@ mod_instant_risk_overview_server <- function(id, con) {
moduleServer(id, function(input, output, session){
ns <- session$ns
# observeEvent(input$compute,{
# browser()
# storages <- c(input$v1, input$v2, input$v3, input$v4)
# names(storages) <- lakes$name
# print(storage)
# df <- calcInstantRisk(con, input$ruleset, input$date, storages)
# df <- head(df[order(df$prob, decreasing = TRUE),], 10)
# output$plot <- renderPlot(
# ggplot(df(), aes(x = objective, y = prob)) +
# geom_col(aes(fill = level)) +
# coord_flip())
# })
df <- reactive({
storages <- c(input$V1, input$V2, input$V3, input$V4)
names(storages) <- lakes$name
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment