[Yuima-commits] r288 - pkg/yuima/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Mar 19 14:54:24 CET 2014


Author: iacus
Date: 2014-03-19 14:54:24 +0100 (Wed, 19 Mar 2014)
New Revision: 288

Modified:
   pkg/yuima/R/toLatex.R
Log:
fixed toLatex

Modified: pkg/yuima/R/toLatex.R
===================================================================
--- pkg/yuima/R/toLatex.R	2014-03-19 12:57:23 UTC (rev 287)
+++ pkg/yuima/R/toLatex.R	2014-03-19 13:54:24 UTC (rev 288)
@@ -234,15 +234,16 @@
     n.eq <- mod at equation.number
     dr <- paste("\\left(\\begin{array}{c}\n")
     for (i in 1:n.eq) {
-        dr <- paste(dr, substr(mod at drift[i], 2, nchar(mod at drift[i]) - 
-							   1), "\\\\ \n")
+        #    dr <- paste(dr, substr(mod at drift[i], 2, nchar(mod at drift[i]) -1), "\\\\ \n")
+              dr <- paste(dr, substr(mod at drift[i], 3, nchar(mod at drift[i]) - 2), "\\\\ \n")
     }
     #
     dr <- paste(dr, "\\end{array}\\right)", sprintf("d%s", mod at time.variable))
     n.n <- mod at noise.number
     df <- paste(sprintf("\\left[\\begin{array}{%s}\n",paste(rep("c",n.n),sep="",collapse="")))
     for (i in 1:n.eq) {
-        df <- paste(df, paste(mod at diffusion[[i]], collapse = "&"))
+        #df <- paste(df, paste(mod at diffusion[[i]], collapse = "&"))
+                df <- paste(df, paste(substr(mod at diffusion[[i]], 2, nchar(mod at diffusion[[i]]) - 1)  , collapse = "&"))
         df <- paste(df, "\\\\ \n")
     }
     df <- paste(df, "\\end{array}\\right]")
@@ -250,9 +251,8 @@
     if (length(mod at jump.coeff)>=1){
       dj<-paste("\\left(\\begin{array}{c}\n")
       for (i in 1:n.eq) {
-        #       dj <- paste(dj, substr(mod at jump.coeff[i], 2, nchar(mod at jump.coeff[i]) - 
-        #                                1), "\\\\ \n")
-        dj <- paste(dj, mod at jump.coeff[i], "\\\\ \n")
+        dj <- paste(dj, substr(mod at jump.coeff[i], 2, nchar(mod at jump.coeff[i]) - 1), "\\\\ \n")
+        #dj <- paste(dj, mod at jump.coeff[i], "\\\\ \n")
         
       }
       dj <- paste(dj, "\\end{array}\\right)", sprintf("d %s", mod at jump.variable))
@@ -302,8 +302,9 @@
     numb.solve.var <- length(mod at solve.variable)
     bodyaus <-c( paste("\\left(\\begin{array}{c}\n"))
     for (i in 1:numb.solve.var) {
-      bodyaus <- paste(bodyaus, paste(paste(mod at solve.variable[i],"(0)",sep=""),substr(mod at xinit[i], 2, nchar(mod at xinit[i]) - 
-                                                                                         1),sep="="), "\\\\ \n")
+      bodyaus <-
+      paste(bodyaus, paste(paste(mod at solve.variable[i],"(0)",sep=""),substr(mod at xinit[i], 3, nchar(mod at xinit[i]) - 2),sep="="), "\\\\ \n")
+      #     paste(bodyaus, paste(paste(mod at solve.variable[i],"(0)",sep=""),substr(mod at xinit[i], 2, nchar(mod at xinit[i]) - 1),sep="="), "\\\\ \n")
     }
     
     bodyaus <- paste(bodyaus, "\\end{array}\\right)")



More information about the Yuima-commits mailing list