[Yuima-commits] r533 - in pkg/yuimaGUI: . R inst/yuimaGUI inst/yuimaGUI/www man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Dec 2 15:44:52 CET 2016


Author: phoenix844
Date: 2016-12-02 15:44:51 +0100 (Fri, 02 Dec 2016)
New Revision: 533

Modified:
   pkg/yuimaGUI/DESCRIPTION
   pkg/yuimaGUI/NAMESPACE
   pkg/yuimaGUI/R/sourceCodeYuimaGUI.R
   pkg/yuimaGUI/inst/yuimaGUI/global.R
   pkg/yuimaGUI/inst/yuimaGUI/server.R
   pkg/yuimaGUI/inst/yuimaGUI/ui.R
   pkg/yuimaGUI/inst/yuimaGUI/www/custom.css
   pkg/yuimaGUI/man/yuimaGUI.Rd
Log:
version for CRAN

Modified: pkg/yuimaGUI/DESCRIPTION
===================================================================
--- pkg/yuimaGUI/DESCRIPTION	2016-12-02 11:28:28 UTC (rev 532)
+++ pkg/yuimaGUI/DESCRIPTION	2016-12-02 14:44:51 UTC (rev 533)
@@ -1,7 +1,7 @@
 Package: yuimaGUI
-Type: Package 
+Type: Package
 Title: A Graphical User Interface for the Yuima Package
-Version: 0.9.4
+Version: 0.9.5
 Author: YUIMA Project Team
 Maintainer: Emanuele Guidotti <emanuele.guidotti at studenti.unimi.it>
 Description: Provides a graphical user interface for the yuima package.

Modified: pkg/yuimaGUI/NAMESPACE
===================================================================
--- pkg/yuimaGUI/NAMESPACE	2016-12-02 11:28:28 UTC (rev 532)
+++ pkg/yuimaGUI/NAMESPACE	2016-12-02 14:44:51 UTC (rev 533)
@@ -1,14 +1,2 @@
 #exportPattern("^[[:alpha:]]+")
-export(yuimaGUI)
-
-import("shiny")
-import("shinyBS")
-importFrom("quantmod",getSymbols, Delt)
-import("DT")
-import("shinyjs")
-import("yuima")
-import("shinydashboard")
-
-
-
-
+export(yuimaGUI)
\ No newline at end of file

Modified: pkg/yuimaGUI/R/sourceCodeYuimaGUI.R
===================================================================
--- pkg/yuimaGUI/R/sourceCodeYuimaGUI.R	2016-12-02 11:28:28 UTC (rev 532)
+++ pkg/yuimaGUI/R/sourceCodeYuimaGUI.R	2016-12-02 14:44:51 UTC (rev 533)
@@ -1,9 +1,11 @@
 yuimaGUI <- function() {
-  suppressWarnings(
-    shiny::runApp(
-      system.file(
-        "yuimaGUI",
-        package = "yuimaGUI"
+  utils::capture.output(
+    suppressWarnings(
+      shiny::runApp(
+        system.file(
+          "yuimaGUI",
+          package = "yuimaGUI"
+        )
       )
     )
   )

Modified: pkg/yuimaGUI/inst/yuimaGUI/global.R
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/global.R	2016-12-02 11:28:28 UTC (rev 532)
+++ pkg/yuimaGUI/inst/yuimaGUI/global.R	2016-12-02 14:44:51 UTC (rev 533)
@@ -1,28 +1,13 @@
-require(DT)
-require(shinyjs)
-require(yuima)
-require(shiny)
-require(sde)
-require(quantmod)
-require(shinydashboard)
-require(shinyBS)
-require(ggplot2)
+suppressMessages(require(DT))
+suppressMessages(require(shinyjs))
+suppressMessages(require(yuima))
+suppressMessages(require(shiny))
+suppressMessages(require(sde))
+suppressMessages(require(quantmod)) 
+suppressMessages(require(shinydashboard)) 
+suppressMessages(require(shinyBS))
+suppressMessages(require(ggplot2))
 
 
-
 if(!exists("yuimaGUIdata"))
-  yuimaGUIdata <<- reactiveValues(series=list(), cp=list(), cpYuima=list(), model=list(), simulation=list(), hedging = list(), llag = list(), cluster = list())
-
-if(!exists("estimateSettings"))
-  estimateSettings <<- list()
-
-if(!exists("deltaSettings"))
-  deltaSettings <<- list()
-
-if(!exists("toLogSettings"))
-  toLogSettings <<- list()
-
-if(!exists("usr_models"))
-  usr_models <<- reactiveValues(model=list(), simulation=list())
-
-
+  yuimaGUIdata <- reactiveValues(series=list(), model=list(), usr_model = list(), simulation=list(), usr_simulation = list(), cp=list(), cpYuima=list(), llag = list(), cluster = list(), hedging = list())

Modified: pkg/yuimaGUI/inst/yuimaGUI/server.R
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/server.R	2016-12-02 11:28:28 UTC (rev 532)
+++ pkg/yuimaGUI/inst/yuimaGUI/server.R	2016-12-02 14:44:51 UTC (rev 533)
@@ -1,13 +1,12 @@
 options(shiny.maxRequestSize = 9*1024^2)
- 
+options("getSymbols.warning4.0"=FALSE)
 
 server <- function(input, output, session) {
 
+  yuimaGUItable <- reactiveValues(series=data.frame(),  model=data.frame(), simulation=data.frame(), hedging=data.frame())
+  yuimaGUIsettings <- list(simulation = list(), estimation = list(), delta = list(), toLog = list())
   
   
-  ### GLOBAL FUNCTIONS
-  yuimaGUItable <<- reactiveValues(series=data.frame(),  model=data.frame(), simulation=data.frame(), hedging=data.frame())
-  
   rbind.fill <- function(..., rep = NA){
     dots <- list(...)
     names <- c()
@@ -92,8 +91,8 @@
   
   observeEvent(yuimaGUIdata$series, priority = 10, {
     n <- names(yuimaGUIdata$series)
-    for (i in names(estimateSettings)) if(!(i %in% n)) estimateSettings[[i]] <<- NULL
-    for (i in names(deltaSettings)) if(!(i %in% n)) deltaSettings[[i]] <<- NULL
+    for (i in names(yuimaGUIsettings$estimation)) if(!(i %in% n)) yuimaGUIsettings$estimation[[i]] <<- NULL
+    for (i in names(yuimaGUIsettings$delta)) if(!(i %in% n)) yuimaGUIsettings$delta[[i]] <<- NULL
   })
   
   observeEvent(yuimaGUIdata$hedging, priority = 10, {
@@ -206,13 +205,13 @@
   
   defaultBounds <- function(name, delta, strict, jumps = NA, AR_C = NA, MA_C = NA, data, intensity = NULL, threshold = NULL){
     lastPrice = last(data)
-    if (name %in% names(isolate({usr_models$model}))){
+    if (name %in% names(isolate({yuimaGUIdata$usr_model}))){
       par <- setModelByName(name = name, jumps = jumps,  AR_C = AR_C, MA_C = MA_C)@parameter at all
       if(strict==TRUE){
         lower <- rep(NA, length(par))
         upper <- rep(NA, length(par))
       } else {
-        if (usr_models$model[[name]]$class=="Compound Poisson"){
+        if (yuimaGUIdata$usr_model[[name]]$class=="Compound Poisson"){
           lower <- rep(0, length(par))
           upper <- rep(1, length(par))
         } else {
@@ -414,11 +413,11 @@
   
   
   setModelByName <- function(name, jumps = NA, AR_C = NA, MA_C = NA, XinExpr = FALSE, intensity = NA){
-    if (name %in% names(isolate({usr_models$model}))){
-      if (isolate({usr_models$model[[name]]$class=="Diffusion process" | usr_models$model[[name]]$class=="Fractional process"}))
-        return(isolate({usr_models$model[[name]]$object}))
-      if (isolate({usr_models$model[[name]]$class=="Compound Poisson"}))
-        return(setPoisson(intensity = isolate({usr_models$model[[name]]$intensity}), df = setJumps(jumps = jumps), solve.variable = "x"))
+    if (name %in% names(isolate({yuimaGUIdata$usr_model}))){
+      if (isolate({yuimaGUIdata$usr_model[[name]]$class=="Diffusion process" | yuimaGUIdata$usr_model[[name]]$class=="Fractional process"}))
+        return(isolate({yuimaGUIdata$usr_model[[name]]$object}))
+      if (isolate({yuimaGUIdata$usr_model[[name]]$class=="Compound Poisson"}))
+        return(setPoisson(intensity = isolate({yuimaGUIdata$usr_model[[name]]$intensity}), df = setJumps(jumps = jumps), solve.variable = "x"))
     }
     if (name == "Brownian Motion" | name == "Bm") return(yuima::setModel(drift="mu", diffusion="sigma", solve.variable = "x"))
     if (name == "Geometric Brownian Motion" | name == "gBm") return(yuima::setModel(drift="mu*x", diffusion="sigma*x", solve.variable = "x"))
@@ -449,7 +448,7 @@
     if (process=="Diffusion process"){
       mod <- ""
       for (name in names){
-        if (name %in% names(isolate({usr_models$model}))){
+        if (name %in% names(isolate({yuimaGUIdata$usr_model}))){
           text <- toLatex(setModelByName(name))
           x <- paste(text[2:9], collapse = "")
           x <- substr(x,3,nchar(x))
@@ -482,7 +481,7 @@
     if (process=="Fractional process"){
       mod <- ""
       for (name in names){
-        if (name %in% names(isolate({usr_models$model}))){
+        if (name %in% names(isolate({yuimaGUIdata$usr_model}))){
           text <- toLatex(setModelByName(name))
           x <- paste(text[2:9], collapse = "")
           x <- substr(x,3,nchar(x))
@@ -503,8 +502,8 @@
     if (process=="Compound Poisson"){
       mod <- paste("X_t = X_0+\\sum_{i=0}^{N_t} Y_i \\; : \\;\\;\\;  N_t \\sim Poi\\Bigl(\\int_0^t \\lambda(t)dt\\Bigl)", ifelse(!is.null(jumps), paste(", \\;\\;\\;\\; ", latexJumps(jumps)),""))
       for (name in names){
-        if (name %in% names(isolate({usr_models$model}))){
-          text <- paste("\\lambda(t)=",usr_models$model[[name]]$intensity)
+        if (name %in% names(isolate({yuimaGUIdata$usr_model}))){
+          text <- paste("\\lambda(t)=",yuimaGUIdata$usr_model[[name]]$intensity)
           mod <- paste(mod, ifelse(mod=="","","\\\\"), text)
         }
         if (name == "Power Low Intensity") mod <- paste(mod, ifelse(mod=="","","\\\\"), "\\lambda(t)=\\alpha \\; t^{\\beta}")
@@ -1433,8 +1432,6 @@
   
   
   
-  
-  
   ###Save all available data
   saveData <- function() {
     dataDownload_series <- reactive({
@@ -1470,14 +1467,33 @@
     HTML('<iframe width="90%" height="250px" src="https://www.youtube.com/embed/XX_bmCrI_gc?rel=0" frameborder="0" allowfullscreen></iframe>')
   })
   
-  # output$certificates <- renderUI({
-  #   div(align = "center",
-  #     HTML('<div id="certificate1" style="display: inline-block;"><img src="seville2016.png" class="thumbnail" height="100" width="100" /></div>
-  #           <div style="display: inline-block;"><img src="oviedo2016.png" class="thumbnail" height="100" width="100" /></div>')
-  #   )
-  # })
   
+  ###############################################################################
+  ###############################################################################
+  ###############################################################################
+  ###############################################################################
+  ###############################################################################
+  ###############################################################################
+  ###############################################################################
+  ###############################################################################
+  ###############################################################################
+  ###############################################################################
+  ###############################################################################
+  ###############################################################################
+  ###############################################################################
+  ###############################################################################
+  ###############################################################################
+  ###############################################################################
+  ###############################################################################
+  ###############################################################################
+  ###############################################################################
+  ###############################################################################
+  ###############################################################################
+  ###############################################################################
   
+  
+  
+  
   ########################Load Economic and Financial Data
   ########################
   ########################
@@ -1719,8 +1735,8 @@
   output$model <- renderUI({
     choices <- as.vector(defaultModels[names(defaultModels)==input$modelClass])
     if(input$modelClass!="Fractional process")
-      for(i in names(usr_models$model))
-        if (usr_models$model[[i]]$class==input$modelClass) {
+      for(i in names(yuimaGUIdata$usr_model))
+        if (yuimaGUIdata$usr_model[[i]]$class==input$modelClass) {
           if(input$modelClass!="Diffusion process") choices <- c(i, choices)
           else if (length(setModelByName(name = i)@parameter at all)!=0) choices <- c(i, choices)
         }
@@ -1823,34 +1839,34 @@
            "Diffusion process" = {
              if (input$usr_model_name!="" & (input$usr_model_coeff_drift!="" | input$usr_model_coeff_diff!="")){
                mod <- try(setModel(drift = tolower(input$usr_model_coeff_drift), diffusion = tolower(input$usr_model_coeff_diff), solve.variable = "x"))
-               if(class(mod)!="try-error") usr_models$model[[input$usr_model_name]] <<- list(object=mod, class=input$usr_modelClass)
+               if(class(mod)!="try-error") yuimaGUIdata$usr_model[[input$usr_model_name]] <<- list(object=mod, class=input$usr_modelClass)
                entered <- TRUE
              }
            },
            "Fractional process" = {
              if (input$usr_model_name!="" & (input$usr_model_coeff_drift!="" | input$usr_model_coeff_diff!="")){
                mod <- try(setModel(drift = tolower(input$usr_model_coeff_drift), diffusion = tolower(input$usr_model_coeff_diff), hurst = NA, solve.variable = "x"))
-               if(class(mod)!="try-error") usr_models$model[[input$usr_model_name]] <<- list(object=mod, class=input$usr_modelClass)
+               if(class(mod)!="try-error") yuimaGUIdata$usr_model[[input$usr_model_name]] <<- list(object=mod, class=input$usr_modelClass)
                entered <- TRUE
              }
            },
            "Compound Poisson" = {
              if (input$usr_model_name!="" & (input$usr_model_coeff_intensity!="")){
                mod <- try(setPoisson(intensity = tolower(input$usr_model_coeff_intensity), df = "", solve.variable = "x"))
-               if(class(mod)!="try-error") usr_models$model[[input$usr_model_name]] <<- list(intensity=tolower(input$usr_model_coeff_intensity), class=input$usr_modelClass)
+               if(class(mod)!="try-error") yuimaGUIdata$usr_model[[input$usr_model_name]] <<- list(intensity=tolower(input$usr_model_coeff_intensity), class=input$usr_modelClass)
                entered <- TRUE
              }
            },
            "Levy process" = {
              if (input$usr_model_name!=""){
                mod <- try(setModel(drift=input$usr_model_coeff_drift, diffusion=input$usr_model_coeff_diff, measure.type = ifelse(is.na(input$usr_model_coeff_intensity), "code", "CP"), measure = list(intensity = input$usr_model_coeff_intensity, df = ""), solve.variable = "x"))
-               if(class(mod)!="try-error") usr_models$model[[input$usr_model_name]] <<- list(intensity=tolower(input$usr_model_coeff_intensity), drift = input$usr_model_coeff_drift, diffusion = input$usr_model_coeff_diff, class=input$usr_modelClass)
+               if(class(mod)!="try-error") yuimaGUIdata$usr_model[[input$usr_model_name]] <<- list(intensity=tolower(input$usr_model_coeff_intensity), drift = input$usr_model_coeff_drift, diffusion = input$usr_model_coeff_diff, class=input$usr_modelClass)
                entered <- TRUE
              }
            } 
           )
     if (entered){
-      estimateSettings[[input$usr_model_name]] <<- list()
+      yuimaGUIsettings$estimation[[input$usr_model_name]] <<- list()
       closeAlert(session, "alert_savingModels")
       if(class(mod)!="try-error") createAlert(session = session, anchorId = "panel_set_model_alert", alertId = "alert_savingModels", style = "success", content = "Model saved successfully")
       else createAlert(session = session, anchorId = "panel_set_model_alert", alertId = "alert_savingModels", style = "error", content = "Model is not correctly specified")
@@ -1858,25 +1874,25 @@
   })
 
   observe({
-    for(mod in names(estimateSettings))
-      if (!(mod %in% c(names(usr_models$model), names(defaultModels))))
-        estimateSettings[[mod]] <<- list()
+    for(mod in names(yuimaGUIsettings$estimation))
+      if (!(mod %in% c(names(yuimaGUIdata$usr_model), names(defaultModels))))
+        yuimaGUIsettings$estimation[[mod]] <<- list()
   })
   
   output$usr_model_saved <- renderUI({
-    if (length(names(usr_models$model))!=0)
-      selectInput("usr_model_saved", label = "Saved Models", choices = names(usr_models$model), selected = tail(names(usr_models$model),1))
+    if (length(names(yuimaGUIdata$usr_model))!=0)
+      selectInput("usr_model_saved", label = "Saved Models", choices = names(yuimaGUIdata$usr_model), selected = tail(names(yuimaGUIdata$usr_model),1))
   })
 
   output$usr_model_saved_latex <- renderUI({
     input$usr_model_button_save
-    if (!is.null(input$usr_model_saved)) if (input$usr_model_saved %in% names(usr_models$model))
-      withMathJax(printModelLatex(input$usr_model_saved, process = usr_models$model[[input$usr_model_saved]]$class))
+    if (!is.null(input$usr_model_saved)) if (input$usr_model_saved %in% names(yuimaGUIdata$usr_model))
+      withMathJax(printModelLatex(input$usr_model_saved, process = yuimaGUIdata$usr_model[[input$usr_model_saved]]$class))
   })
 
   observeEvent(input$usr_model_button_delete, {
     for (i in input$usr_model_saved)
-      usr_models$model[i] <<- NULL
+      yuimaGUIdata$usr_model[i] <<- NULL
   })
 
 
@@ -2087,66 +2103,66 @@
   observe({
     class <- isolate({input$modelClass})
     for (symb in rownames(seriesToEstimate$table)){
-      if (is.null(deltaSettings[[symb]])) {
+      if (is.null(yuimaGUIsettings$delta[[symb]])) {
         i <- index(getData(symb))
-        if(is.numeric(i)) deltaSettings[[symb]] <<- mode(diff(i))
-        else deltaSettings[[symb]] <<- 0.01
+        if(is.numeric(i)) yuimaGUIsettings$delta[[symb]] <<- mode(diff(i))
+        else yuimaGUIsettings$delta[[symb]] <<- 0.01
       }
-      if (is.null(toLogSettings[[symb]])) toLogSettings[[symb]] <<- FALSE
+      if (is.null(yuimaGUIsettings$toLog[[symb]])) yuimaGUIsettings$toLog[[symb]] <<- FALSE
       data <- na.omit(as.numeric(getData(symb)))
-      if (toLogSettings[[symb]]==TRUE) data <- log(data)
+      if (yuimaGUIsettings$toLog[[symb]]==TRUE) data <- log(data)
       for (modName in input$model){
         if (class(try(setModelByName(modName, intensity = input$model_levy_intensity, jumps = jumps_shortcut(class = class, jumps = input$jumps), AR_C = ifelse(class %in% c("CARMA","COGARCH"), input$AR_C, NA), MA_C = ifelse(class %in% c("CARMA","COGARCH"), input$MA_C, NA))))!="try-error"){
-          if (is.null(estimateSettings[[modName]]))
-            estimateSettings[[modName]] <<- list()
-          if (is.null(estimateSettings[[modName]][[symb]]))
-            estimateSettings[[modName]][[symb]] <<- list()
-          if (is.null(estimateSettings[[modName]][[symb]][["fixed"]]) | !(class %in% c("Diffusion process", "Fractional process")) | prev_buttonDelta!=input$advancedSettingsButtonApplyDelta | prev_buttonAllDelta!=input$advancedSettingsButtonApplyAllDelta)
-            estimateSettings[[modName]][[symb]][["fixed"]] <<- list()
-          if (is.null(estimateSettings[[modName]][[symb]][["start"]]) | !(class %in% c("Diffusion process", "Fractional process")) | prev_buttonDelta!=input$advancedSettingsButtonApplyDelta | prev_buttonAllDelta!=input$advancedSettingsButtonApplyAllDelta)
-            estimateSettings[[modName]][[symb]][["start"]] <<- list()
-          if (is.null(estimateSettings[[modName]][[symb]][["threshold"]]))
-            estimateSettings[[modName]][[symb]][["threshold"]] <<- setThreshold(class = class, data = data)
+          if (is.null(yuimaGUIsettings$estimation[[modName]]))
+            yuimaGUIsettings$estimation[[modName]] <<- list()
+          if (is.null(yuimaGUIsettings$estimation[[modName]][[symb]]))
+            yuimaGUIsettings$estimation[[modName]][[symb]] <<- list()
+          if (is.null(yuimaGUIsettings$estimation[[modName]][[symb]][["fixed"]]) | !(class %in% c("Diffusion process", "Fractional process")) | prev_buttonDelta!=input$advancedSettingsButtonApplyDelta | prev_buttonAllDelta!=input$advancedSettingsButtonApplyAllDelta)
+            yuimaGUIsettings$estimation[[modName]][[symb]][["fixed"]] <<- list()
+          if (is.null(yuimaGUIsettings$estimation[[modName]][[symb]][["start"]]) | !(class %in% c("Diffusion process", "Fractional process")) | prev_buttonDelta!=input$advancedSettingsButtonApplyDelta | prev_buttonAllDelta!=input$advancedSettingsButtonApplyAllDelta)
+            yuimaGUIsettings$estimation[[modName]][[symb]][["start"]] <<- list()
+          if (is.null(yuimaGUIsettings$estimation[[modName]][[symb]][["threshold"]]))
+            yuimaGUIsettings$estimation[[modName]][[symb]][["threshold"]] <<- setThreshold(class = class, data = data)
           
           startMinMax <- defaultBounds(name = modName, 
                                        jumps = jumps_shortcut(class = class, jumps = input$jumps), 
                                        intensity = input$model_levy_intensity,
-                                       threshold = estimateSettings[[modName]][[symb]][["threshold"]],
+                                       threshold = yuimaGUIsettings$estimation[[modName]][[symb]][["threshold"]],
                                        AR_C = ifelse(class %in% c("CARMA","COGARCH"), input$AR_C, NA), 
                                        MA_C = ifelse(class %in% c("CARMA","COGARCH"), input$MA_C, NA), 
                                        strict = FALSE,
                                        data = data,
-                                       delta = deltaSettings[[symb]])
+                                       delta = yuimaGUIsettings$delta[[symb]])
           upperLower <- defaultBounds(name = modName, 
                                       jumps = jumps_shortcut(class = class, jumps = input$jumps), 
                                       intensity = input$model_levy_intensity,
-                                      threshold = estimateSettings[[modName]][[symb]][["threshold"]],
+                                      threshold = yuimaGUIsettings$estimation[[modName]][[symb]][["threshold"]],
                                       AR_C = ifelse(class %in% c("CARMA","COGARCH"), input$AR_C, NA), 
                                       MA_C = ifelse(class %in% c("CARMA","COGARCH"), input$MA_C, NA),
                                       strict = TRUE,
                                       data = data,
-                                      delta = deltaSettings[[symb]])
+                                      delta = yuimaGUIsettings$delta[[symb]])
           
-          if (is.null(estimateSettings[[modName]][[symb]][["startMin"]]) | !(class %in% c("Diffusion process", "Fractional process")) | prev_buttonDelta!=input$advancedSettingsButtonApplyDelta | prev_buttonAllDelta!=input$advancedSettingsButtonApplyAllDelta)
-            estimateSettings[[modName]][[symb]][["startMin"]] <<- startMinMax$lower
-          if (is.null(estimateSettings[[modName]][[symb]][["startMax"]]) | !(class %in% c("Diffusion process", "Fractional process")) | prev_buttonDelta!=input$advancedSettingsButtonApplyDelta | prev_buttonAllDelta!=input$advancedSettingsButtonApplyAllDelta)
-            estimateSettings[[modName]][[symb]][["startMax"]] <<- startMinMax$upper
-          if (is.null(estimateSettings[[modName]][[symb]][["upper"]]) | !(class %in% c("Diffusion process", "Fractional process")) | prev_buttonDelta!=input$advancedSettingsButtonApplyDelta | prev_buttonAllDelta!=input$advancedSettingsButtonApplyAllDelta)
-            estimateSettings[[modName]][[symb]][["upper"]] <<- upperLower$upper
-          if (is.null(estimateSettings[[modName]][[symb]][["lower"]]) | !(class %in% c("Diffusion process", "Fractional process")) | prev_buttonDelta!=input$advancedSettingsButtonApplyDelta | prev_buttonAllDelta!=input$advancedSettingsButtonApplyAllDelta)
-            estimateSettings[[modName]][[symb]][["lower"]] <<- upperLower$lower
-          if (is.null(estimateSettings[[modName]][[symb]][["method"]])){
-            if(class=="COGARCH" | class=="CARMA") estimateSettings[[modName]][[symb]][["method"]] <<- "SANN"
-            else estimateSettings[[modName]][[symb]][["method"]] <<- "L-BFGS-B"
+          if (is.null(yuimaGUIsettings$estimation[[modName]][[symb]][["startMin"]]) | !(class %in% c("Diffusion process", "Fractional process")) | prev_buttonDelta!=input$advancedSettingsButtonApplyDelta | prev_buttonAllDelta!=input$advancedSettingsButtonApplyAllDelta)
+            yuimaGUIsettings$estimation[[modName]][[symb]][["startMin"]] <<- startMinMax$lower
+          if (is.null(yuimaGUIsettings$estimation[[modName]][[symb]][["startMax"]]) | !(class %in% c("Diffusion process", "Fractional process")) | prev_buttonDelta!=input$advancedSettingsButtonApplyDelta | prev_buttonAllDelta!=input$advancedSettingsButtonApplyAllDelta)
+            yuimaGUIsettings$estimation[[modName]][[symb]][["startMax"]] <<- startMinMax$upper
+          if (is.null(yuimaGUIsettings$estimation[[modName]][[symb]][["upper"]]) | !(class %in% c("Diffusion process", "Fractional process")) | prev_buttonDelta!=input$advancedSettingsButtonApplyDelta | prev_buttonAllDelta!=input$advancedSettingsButtonApplyAllDelta)
+            yuimaGUIsettings$estimation[[modName]][[symb]][["upper"]] <<- upperLower$upper
+          if (is.null(yuimaGUIsettings$estimation[[modName]][[symb]][["lower"]]) | !(class %in% c("Diffusion process", "Fractional process")) | prev_buttonDelta!=input$advancedSettingsButtonApplyDelta | prev_buttonAllDelta!=input$advancedSettingsButtonApplyAllDelta)
+            yuimaGUIsettings$estimation[[modName]][[symb]][["lower"]] <<- upperLower$lower
+          if (is.null(yuimaGUIsettings$estimation[[modName]][[symb]][["method"]])){
+            if(class=="COGARCH" | class=="CARMA") yuimaGUIsettings$estimation[[modName]][[symb]][["method"]] <<- "SANN"
+            else yuimaGUIsettings$estimation[[modName]][[symb]][["method"]] <<- "L-BFGS-B"
           }
-          if (is.null(estimateSettings[[modName]][[symb]][["trials"]]))
-            estimateSettings[[modName]][[symb]][["trials"]] <<- 1
-          if (is.null(estimateSettings[[modName]][[symb]][["seed"]]))
-            estimateSettings[[modName]][[symb]][["seed"]] <<- NA
-          if (is.null(estimateSettings[[modName]][[symb]][["joint"]]))
-            estimateSettings[[modName]][[symb]][["joint"]] <<- FALSE
-          if (is.null(estimateSettings[[modName]][[symb]][["aggregation"]]))
-            estimateSettings[[modName]][[symb]][["aggregation"]] <<- TRUE
+          if (is.null(yuimaGUIsettings$estimation[[modName]][[symb]][["trials"]]))
+            yuimaGUIsettings$estimation[[modName]][[symb]][["trials"]] <<- 1
+          if (is.null(yuimaGUIsettings$estimation[[modName]][[symb]][["seed"]]))
+            yuimaGUIsettings$estimation[[modName]][[symb]][["seed"]] <<- NA
+          if (is.null(yuimaGUIsettings$estimation[[modName]][[symb]][["joint"]]))
+            yuimaGUIsettings$estimation[[modName]][[symb]][["joint"]] <<- FALSE
+          if (is.null(yuimaGUIsettings$estimation[[modName]][[symb]][["aggregation"]]))
+            yuimaGUIsettings$estimation[[modName]][[symb]][["aggregation"]] <<- TRUE
         }
       }
     }
@@ -2167,13 +2183,13 @@
   })
   output$advancedSettingsDelta <- renderUI({
     if (!is.null(input$advancedSettingsModel) & !is.null(input$advancedSettingsSeries))
-      return (numericInput("advancedSettingsDelta", label = paste("delta", input$advancedSettingsSeries), value = deltaSettings[[input$advancedSettingsSeries]]))
+      return (numericInput("advancedSettingsDelta", label = paste("delta", input$advancedSettingsSeries), value = yuimaGUIsettings$delta[[input$advancedSettingsSeries]]))
   })
   output$advancedSettingsToLog <- renderUI({
     if (!is.null(input$advancedSettingsModel) & !is.null(input$advancedSettingsSeries)){
       choices <- FALSE
       if (all(getData(input$advancedSettingsSeries)>0)) choices <- c(FALSE, TRUE)
-      return (selectInput("advancedSettingsToLog", label = "Convert to log", choices = choices, selected = toLogSettings[[input$advancedSettingsSeries]]))
+      return (selectInput("advancedSettingsToLog", label = "Convert to log", choices = choices, selected = yuimaGUIsettings$toLog[[input$advancedSettingsSeries]]))
     }
   })
   output$advancedSettingsModel <- renderUI({
@@ -2192,13 +2208,13 @@
   })
   #REMOVE# output$advancedSettingsFixed <- renderUI({
   #REMOVE#  if (!is.null(input$advancedSettingsModel) & !is.null(input$advancedSettingsSeries) & !is.null(input$advancedSettingsParameter))
-  #REMOVE#    numericInput(inputId = "advancedSettingsFixed", label = "fixed", value = ifelse(is.null(estimateSettings[[input$advancedSettingsModel]][[input$advancedSettingsSeries]][["fixed"]][[input$advancedSettingsParameter]]),NA,estimateSettings[[input$advancedSettingsModel]][[input$advancedSettingsSeries]][["fixed"]][[input$advancedSettingsParameter]]))
+  #REMOVE#    numericInput(inputId = "advancedSettingsFixed", label = "fixed", value = ifelse(is.null(yuimaGUIsettings$estimation[[input$advancedSettingsModel]][[input$advancedSettingsSeries]][["fixed"]][[input$advancedSettingsParameter]]),NA,yuimaGUIsettings$estimation[[input$advancedSettingsModel]][[input$advancedSettingsSeries]][["fixed"]][[input$advancedSettingsParameter]]))
   #REMOVE#})
   output$advancedSettingsStart <- renderUI({
     if (#REMOVE# !is.null(input$advancedSettingsFixed) & 
       !is.null(input$advancedSettingsModel) & !is.null(input$advancedSettingsSeries) & !is.null(input$advancedSettingsParameter))
       #REMOVE# if (is.na(input$advancedSettingsFixed))
-        numericInput(inputId = "advancedSettingsStart", label = "start", value = estimateSettings[[input$advancedSettingsModel]][[input$advancedSettingsSeries]][["start"]][[input$advancedSettingsParameter]])
+        numericInput(inputId = "advancedSettingsStart", label = "start", value = yuimaGUIsettings$estimation[[input$advancedSettingsModel]][[input$advancedSettingsSeries]][["start"]][[input$advancedSettingsParameter]])
   })
   output$advancedSettingsStartMin <- renderUI({
     input$advancedSettingsButtonApplyDelta
@@ -2207,7 +2223,7 @@
       !is.null(input$advancedSettingsStart) & !is.null(input$advancedSettingsModel) & !is.null(input$advancedSettingsSeries) & !is.null(input$advancedSettingsParameter))
       if (#REMOVE# is.na(input$advancedSettingsFixed) & 
         is.na(input$advancedSettingsStart))
-        numericInput(inputId = "advancedSettingsStartMin", label = "start: Min", value = estimateSettings[[input$advancedSettingsModel]][[input$advancedSettingsSeries]][["startMin"]][[input$advancedSettingsParameter]])
+        numericInput(inputId = "advancedSettingsStartMin", label = "start: Min", value = yuimaGUIsettings$estimation[[input$advancedSettingsModel]][[input$advancedSettingsSeries]][["startMin"]][[input$advancedSettingsParameter]])
   })
   output$advancedSettingsStartMax <- renderUI({
     input$advancedSettingsButtonApplyDelta
@@ -2216,105 +2232,105 @@
       !is.null(input$advancedSettingsStart) & !is.null(input$advancedSettingsModel) & !is.null(input$advancedSettingsSeries) & !is.null(input$advancedSettingsParameter))
       if (#REMOVE# is.na(input$advancedSettingsFixed) & 
         is.na(input$advancedSettingsStart))
-        numericInput(inputId = "advancedSettingsStartMax", label = "start: Max", value = estimateSettings[[input$advancedSettingsModel]][[input$advancedSettingsSeries]][["startMax"]][[input$advancedSettingsParameter]])
+        numericInput(inputId = "advancedSettingsStartMax", label = "start: Max", value = yuimaGUIsettings$estimation[[input$advancedSettingsModel]][[input$advancedSettingsSeries]][["startMax"]][[input$advancedSettingsParameter]])
   })
   output$advancedSettingsLower <- renderUI({
     if (#REMOVE# !is.null(input$advancedSettingsFixed) & 
       !is.null(input$advancedSettingsModel) & !is.null(input$advancedSettingsSeries) & !is.null(input$advancedSettingsParameter))
       #REMOVE# if (is.na(input$advancedSettingsFixed))
         if (input$advancedSettingsMethod=="L-BFGS-B" | input$advancedSettingsMethod=="Brent")
-          numericInput("advancedSettingsLower", label = "lower", value = estimateSettings[[input$advancedSettingsModel]][[input$advancedSettingsSeries]][["lower"]][[input$advancedSettingsParameter]])
+          numericInput("advancedSettingsLower", label = "lower", value = yuimaGUIsettings$estimation[[input$advancedSettingsModel]][[input$advancedSettingsSeries]][["lower"]][[input$advancedSettingsParameter]])
   })
   output$advancedSettingsUpper <- renderUI({
     if (#REMOVE# !is.null(input$advancedSettingsFixed) & 
       !is.null(input$advancedSettingsModel) & !is.null(input$advancedSettingsSeries) & !is.null(input$advancedSettingsParameter))
       #REMOVE# if (is.na(input$advancedSettingsFixed))
         if (input$advancedSettingsMethod=="L-BFGS-B" | input$advancedSettingsMethod=="Brent")
-          numericInput("advancedSettingsUpper", label = "upper", value = estimateSettings[[input$advancedSettingsModel]][[input$advancedSettingsSeries]][["upper"]][[input$advancedSettingsParameter]])
+          numericInput("advancedSettingsUpper", label = "upper", value = yuimaGUIsettings$estimation[[input$advancedSettingsModel]][[input$advancedSettingsSeries]][["upper"]][[input$advancedSettingsParameter]])
   })
   #REMOVE# output$advancedSettingsJoint <- renderUI({
   #REMOVE#   if (!is.null(input$advancedSettingsModel) & !is.null(input$advancedSettingsSeries))
-  #REMOVE#     selectInput("advancedSettingsJoint", label = "joint", choices = c(FALSE, TRUE), selected = estimateSettings[[input$advancedSettingsModel]][[input$advancedSettingsSeries]][["joint"]])
+  #REMOVE#     selectInput("advancedSettingsJoint", label = "joint", choices = c(FALSE, TRUE), selected = yuimaGUIsettings$estimation[[input$advancedSettingsModel]][[input$advancedSettingsSeries]][["joint"]])
   #REMOVE# })
   output$advancedSettingsMethod <- renderUI({
     if (!is.null(input$advancedSettingsModel) & !is.null(input$advancedSettingsSeries))
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/yuima -r 533


More information about the Yuima-commits mailing list