diff --git a/.Rproj.user/178A6739/sources/prop/A1AE5A83 b/.Rproj.user/178A6739/sources/prop/A1AE5A83 index 499b685..d985886 100644 --- a/.Rproj.user/178A6739/sources/prop/A1AE5A83 +++ b/.Rproj.user/178A6739/sources/prop/A1AE5A83 @@ -1,6 +1,6 @@ { "source_window_id": "", "Source": "Source", - "cursorPosition": "23,0", - "scrollLine": "16" + "cursorPosition": "451,32", + "scrollLine": "442" } \ No newline at end of file diff --git a/.Rproj.user/178A6739/sources/session-99529da2/FE6BB309 b/.Rproj.user/178A6739/sources/session-99529da2/FE6BB309 index 85baa63..03239c0 100644 --- a/.Rproj.user/178A6739/sources/session-99529da2/FE6BB309 +++ b/.Rproj.user/178A6739/sources/session-99529da2/FE6BB309 @@ -12,15 +12,15 @@ "properties": { "source_window_id": "", "Source": "Source", - "cursorPosition": "23,0", - "scrollLine": "16" + "cursorPosition": "451,32", + "scrollLine": "442" }, "folds": "", - "lastKnownWriteTime": 1686050157, + "lastKnownWriteTime": 1686050585, "encoding": "UTF-8", "collab_server": "", "source_window": "", - "last_content_update": 1686050157531, + "last_content_update": 1686050585975, "read_only": false, "read_only_alternatives": [] } \ No newline at end of file diff --git a/.Rproj.user/178A6739/sources/session-99529da2/FE6BB309-contents b/.Rproj.user/178A6739/sources/session-99529da2/FE6BB309-contents index b25a5df..f9f149c 100644 --- a/.Rproj.user/178A6739/sources/session-99529da2/FE6BB309-contents +++ b/.Rproj.user/178A6739/sources/session-99529da2/FE6BB309-contents @@ -140,7 +140,7 @@ server <- function(input, output) { databaseID <- "IFS" startdate = min(new.data()$report_date) enddate = max(new.data()$report_date) - country = countries[countries$Country == input$country, ]$Alpha.2.code + country = countries[countries$Country == input$country,]$Alpha.2.code withProgress(message = "Extracting data from IMF", detail = "Hope their server is up!", value = 0, @@ -210,7 +210,7 @@ server <- function(input, output) { # removing rows with no macroeconomic data dataset_eco <- dataset_with_eco[!is.na(dataset_with_eco$gdp_lag) & - !is.na(dataset_with_eco$prices_lag),] + !is.na(dataset_with_eco$prices_lag), ] setProgress(value = 2, message = "working..") }) @@ -325,8 +325,7 @@ server <- function(input, output) { # Model Selection. Using functions. In production these are to be converted to APIs selected_model <- reactive({ - req(input$start_model_selection, - !is.null(dataset_with_eco())) + req(input$start_model_selection,!is.null(dataset_with_eco())) model_sel(dff = dataset_with_eco()) }) @@ -646,7 +645,7 @@ server <- function(input, output) { }) output$cumprob <- renderText({ - req(!is.null(input$sim_res_sel),!is.null(simresdata())) + req(!is.null(input$sim_res_sel), !is.null(simresdata())) hist.pro <- simresdata() pro_dens <- data.frame(hist.pro$x, hist.pro$y) res <- brushedPoints(pro_dens, input$sim_res_sel) diff --git a/app.R b/app.R index b25a5df..f9f149c 100644 --- a/app.R +++ b/app.R @@ -140,7 +140,7 @@ server <- function(input, output) { databaseID <- "IFS" startdate = min(new.data()$report_date) enddate = max(new.data()$report_date) - country = countries[countries$Country == input$country, ]$Alpha.2.code + country = countries[countries$Country == input$country,]$Alpha.2.code withProgress(message = "Extracting data from IMF", detail = "Hope their server is up!", value = 0, @@ -210,7 +210,7 @@ server <- function(input, output) { # removing rows with no macroeconomic data dataset_eco <- dataset_with_eco[!is.na(dataset_with_eco$gdp_lag) & - !is.na(dataset_with_eco$prices_lag),] + !is.na(dataset_with_eco$prices_lag), ] setProgress(value = 2, message = "working..") }) @@ -325,8 +325,7 @@ server <- function(input, output) { # Model Selection. Using functions. In production these are to be converted to APIs selected_model <- reactive({ - req(input$start_model_selection, - !is.null(dataset_with_eco())) + req(input$start_model_selection,!is.null(dataset_with_eco())) model_sel(dff = dataset_with_eco()) }) @@ -646,7 +645,7 @@ server <- function(input, output) { }) output$cumprob <- renderText({ - req(!is.null(input$sim_res_sel),!is.null(simresdata())) + req(!is.null(input$sim_res_sel), !is.null(simresdata())) hist.pro <- simresdata() pro_dens <- data.frame(hist.pro$x, hist.pro$y) res <- brushedPoints(pro_dens, input$sim_res_sel)