[Robast-commits] r853 - branches/robast-1.0/pkg/RobExtremesBuffer

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Nov 6 11:13:56 CET 2015


Author: eugenm123
Date: 2015-11-06 11:13:56 +0100 (Fri, 06 Nov 2015)
New Revision: 853

Modified:
   branches/robast-1.0/pkg/RobExtremesBuffer/server.R
Log:
Wenn das feld "DF" leer ist, dann wird einfach mit 1 intern gerechnet.

Modified: branches/robast-1.0/pkg/RobExtremesBuffer/server.R
===================================================================
--- branches/robast-1.0/pkg/RobExtremesBuffer/server.R	2015-11-06 10:08:29 UTC (rev 852)
+++ branches/robast-1.0/pkg/RobExtremesBuffer/server.R	2015-11-06 10:13:56 UTC (rev 853)
@@ -102,6 +102,13 @@
     return(result)
   })
   
+  getInputDf <- reactive({
+    if(is.na(input$df))
+      return(1)
+    
+    return(input$df)
+    })
+  
   resetConfiguration <- function(){
     numMultiplicators <- getNumMultiplicators(isolate(getCurrentGridName()), isolate(getCurrentFamilyName()))
     
@@ -112,10 +119,10 @@
     configuration$useExisting <- as.list(rep(FALSE, numMultiplicators))
   }
   
-  observe({ # Depends on input$df. Outputs output$df, configuration$df
-    if(input$df > 0) {
+  observe({ # Depends on getInputDf(). Outputs output$df, configuration$df
+    if(getInputDf() > 0) {
       whichLM <- isolate(getCurrentLM())
-      configuration$df[[whichLM]] <- input$df
+      configuration$df[[whichLM]] <- getInputDf()
     } else {
       updateNumericInput(session, "df", value=1)
     }
@@ -141,7 +148,7 @@
     
     ranges <- configuration$ranges[[lm]] # TODO: Create getCurrentRanges() function
     
-    if(df != isolate(input$df)){
+    if(df != isolate(getInputDf())){
       updateNumericInput(session, "df", value=df)
     }
     



More information about the Robast-commits mailing list