[Yuima-commits] r532 - in pkg/yuimaGUI: R inst/yuimaGUI
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Dec 2 12:28:28 CET 2016
Author: phoenix844
Date: 2016-12-02 12:28:28 +0100 (Fri, 02 Dec 2016)
New Revision: 532
Modified:
pkg/yuimaGUI/R/sourceCodeYuimaGUI.R
pkg/yuimaGUI/inst/yuimaGUI/global.R
pkg/yuimaGUI/inst/yuimaGUI/server.R
Log:
version for CRAN
Modified: pkg/yuimaGUI/R/sourceCodeYuimaGUI.R
===================================================================
--- pkg/yuimaGUI/R/sourceCodeYuimaGUI.R 2016-12-01 15:09:41 UTC (rev 531)
+++ pkg/yuimaGUI/R/sourceCodeYuimaGUI.R 2016-12-02 11:28:28 UTC (rev 532)
@@ -1,8 +1,10 @@
yuimaGUI <- function() {
- invisible(shiny::runApp(
- system.file(
- "yuimaGUI",
- package = "yuimaGUI"
+ suppressWarnings(
+ shiny::runApp(
+ system.file(
+ "yuimaGUI",
+ package = "yuimaGUI"
+ )
)
- ))
+ )
}
Modified: pkg/yuimaGUI/inst/yuimaGUI/global.R
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/global.R 2016-12-01 15:09:41 UTC (rev 531)
+++ pkg/yuimaGUI/inst/yuimaGUI/global.R 2016-12-02 11:28:28 UTC (rev 532)
@@ -9,6 +9,7 @@
require(ggplot2)
+
if(!exists("yuimaGUIdata"))
yuimaGUIdata <<- reactiveValues(series=list(), cp=list(), cpYuima=list(), model=list(), simulation=list(), hedging = list(), llag = list(), cluster = list())
@@ -24,3 +25,4 @@
if(!exists("usr_models"))
usr_models <<- reactiveValues(model=list(), simulation=list())
+
Modified: pkg/yuimaGUI/inst/yuimaGUI/server.R
===================================================================
--- pkg/yuimaGUI/inst/yuimaGUI/server.R 2016-12-01 15:09:41 UTC (rev 531)
+++ pkg/yuimaGUI/inst/yuimaGUI/server.R 2016-12-02 11:28:28 UTC (rev 532)
@@ -3,6 +3,8 @@
server <- function(input, output, session) {
+
+
### GLOBAL FUNCTIONS
yuimaGUItable <<- reactiveValues(series=data.frame(), model=data.frame(), simulation=data.frame(), hedging=data.frame())
@@ -635,7 +637,7 @@
}
if (!is.null(temp$conversion)) if (temp$conversion==FALSE) shinyjs::hide(choicesUI)
if (yuimaGUI$info$class=="COGARCH") {
- test <- try(Diagnostic.Cogarch(yuimaGUI$model, param = as.list(coef(yuimaGUI$qmle))))
+ capture.output(test <- try(Diagnostic.Cogarch(yuimaGUI$model, param = as.list(coef(yuimaGUI$qmle)))))
if (class(test)=="try-error") createAlert(session = session, anchorId = anchorId, alertId = alertId, content = paste("The estimated model does not satisfy theoretical properties.", temp$msg), style = "warning")
else if(test$stationary==FALSE | test$positivity==FALSE) createAlert(session = session, anchorId = anchorId, alertId = alertId, content = paste("The estimated model does not satisfy theoretical properties.", temp$msg), style = "warning")
else createAlert(session = session, anchorId = anchorId, alertId = alertId, content = paste(msg, temp$msg), style = style)
@@ -1205,9 +1207,9 @@
if(saveTraj==TRUE){
times <- index(trajectory)
if(class(info$simulate.from)=="Date")
- index(trajectory) <- as.POSIXct(24*60*60*(times-times[1])/simulation at sampling@delta*as.numeric(info$simulate.to-info$simulate.from)/(simulation at sampling@n), origin = info$simulate.from)
+ index(trajectory) <- as.POSIXct(24*60*60*(times-times[1])/simulation at sampling@delta[1]*as.numeric(info$simulate.to-info$simulate.from)/(simulation at sampling@n[1]), origin = info$simulate.from)
if(class(info$simulate.from)=="numeric")
- index(trajectory) <- as.numeric(times/simulation at sampling@delta*as.numeric(info$simulate.to-info$simulate.from)/(simulation at sampling@n))
+ index(trajectory) <- as.numeric(times/simulation at sampling@delta[1]*as.numeric(info$simulate.to-info$simulate.from)/(simulation at sampling@n[1]))
if(!is.null(colnames(trajectory)))
colnames(trajectory) <- seq(1:length(colnames(trajectory)))
}
@@ -1431,6 +1433,9 @@
+
+
+ ###Save all available data
saveData <- function() {
dataDownload_series <- reactive({
for (symb in names(yuimaGUIdata$series)){
@@ -1460,22 +1465,6 @@
switch(class, "Diffusion process" = NA, "Fractional process" = NA,"Compound Poisson" = jumps, "COGARCH"=NA, "CARMA" = NA, "Levy process" = jumps)
}
-
- ########################################
- ########################################
- ########################################
- ########################################
- ########################################
- ########################################
- ########################################
- ########################################
- ########################################
- ########################################
- ########################################
- ########################################
- ########################################
- ########################################
- ########################################
### Home
output$video_intro <- renderUI({
HTML('<iframe width="90%" height="250px" src="https://www.youtube.com/embed/XX_bmCrI_gc?rel=0" frameborder="0" allowfullscreen></iframe>')
More information about the Yuima-commits
mailing list