[Yuima-commits] r294 - in pkg/yuima: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Mar 23 16:57:45 CET 2014
Author: lorenzo
Date: 2014-03-23 16:57:44 +0100 (Sun, 23 Mar 2014)
New Revision: 294
Modified:
pkg/yuima/DESCRIPTION
pkg/yuima/R/sim.euler.R
pkg/yuima/R/sim.euler.space.discretized.R
Log:
Modified simulate function for initial starting point
Modified: pkg/yuima/DESCRIPTION
===================================================================
--- pkg/yuima/DESCRIPTION 2014-03-23 12:32:21 UTC (rev 293)
+++ pkg/yuima/DESCRIPTION 2014-03-23 15:57:44 UTC (rev 294)
@@ -1,7 +1,7 @@
Package: yuima
Type: Package
Title: The YUIMA Project package
-Version: 1.0.4
+Version: 1.0.5
Date: 2014-03-23
Depends: methods, zoo, stats4, utils, expm
Suggests: cubature, mvtnorm
Modified: pkg/yuima/R/sim.euler.R
===================================================================
--- pkg/yuima/R/sim.euler.R 2014-03-23 12:32:21 UTC (rev 293)
+++ pkg/yuima/R/sim.euler.R 2014-03-23 15:57:44 UTC (rev 294)
@@ -16,9 +16,10 @@
# 06/11 xinit is an expression: the structure is equal to that of V0
if(length(unique(as.character(xinit)))==1 &&
- is.numeric(tryCatch(eval(dX_dummy[i],env),error=function(...) FALSE))){
+ is.numeric(tryCatch(eval(xinit[1],env),error=function(...) FALSE))){
dX_dummy<-xinit[1]
dummy.val<-eval(dX_dummy, env)
+ if(length(dummy.val)==1){dummy.val<-rep(dummy.val,length(xinit))}
for(i in 1:length(modelstate)){
assign(modelstate[i],dummy.val[i] ,env)
}
Modified: pkg/yuima/R/sim.euler.space.discretized.R
===================================================================
--- pkg/yuima/R/sim.euler.space.discretized.R 2014-03-23 12:32:21 UTC (rev 293)
+++ pkg/yuima/R/sim.euler.space.discretized.R 2014-03-23 15:57:44 UTC (rev 294)
@@ -14,9 +14,10 @@
n <- yuima at sampling@n[1]
# dX <- xinit
if(length(unique(as.character(xinit)))==1 &&
- is.numeric(tryCatch(eval(dX_dummy[i],env),error=function(...) FALSE))){
+ is.numeric(tryCatch(eval(xinit[1],env),error=function(...) FALSE))){
dX_dummy<-xinit[1]
dummy.val<-eval(dX_dummy, env)
+ if(length(dummy.val)==1){dummy.val<-rep(dummy.val,length(xinit))}
for(i in 1:length(modelstate)){
assign(modelstate[i],dummy.val[i] ,env)
}
More information about the Yuima-commits
mailing list