[Seqinr-commits] r1574 - pkg/inst/doc/src/config

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Apr 23 10:35:12 CEST 2009


Author: lobry
Date: 2009-04-23 10:35:10 +0200 (Thu, 23 Apr 2009)
New Revision: 1574

Modified:
   pkg/inst/doc/src/config/commonrnw.rnw
Log:
Since 2.9.0 Sweave has changed and we need to go back one frame further to get the name of the file sweaved

Modified: pkg/inst/doc/src/config/commonrnw.rnw
===================================================================
--- pkg/inst/doc/src/config/commonrnw.rnw	2009-04-22 14:06:34 UTC (rev 1573)
+++ pkg/inst/doc/src/config/commonrnw.rnw	2009-04-23 08:35:10 UTC (rev 1574)
@@ -28,9 +28,14 @@
 %
 <<options, echo=FALSE, fig=FALSE, results=hide, eval=TRUE>>=
 options(prompt=" ", continue=" ", width = 77)
-.CurFileName <- get("file", env = parent.frame(3))
+.RversionName <-strsplit(R.version.string, ",")[[1]]
+if (as.numeric(R.version[["major"]])+as.numeric(R.version[["minor"]])/100 >=2.09 ) {
+    framenumber<-4
+  } else {
+    framenumber<-3
+}
+.CurFileName <- get("file", env = parent.frame(framenumber))
 .PrefixName <-strsplit(.CurFileName, "\\.")[[1]][1]
-.RversionName <-strsplit(R.version.string, ",")[[1]]
 r <- getOption("repos")
 r["CRAN"] <- "http://cran.univ-lyon1.fr"
 options(repos = r)



More information about the Seqinr-commits mailing list