[Rd] Error with named chunks in Sweave with the development version of R

Clément Calenge clement.calenge at oncfs.gouv.fr
Mon Feb 7 13:36:58 CET 2011


Dear all,

There seems to be a problem with named chunks in Sweave with the version 
of R under development (downloaded yesterday). When I sweave the file 
toto.Rnw described at the end of this mail (Ubuntu 10.04 LTS), the 
function Sweave returns an Internal error:

 > utils::Sweave("toto.Rnw")
Writing to file toto.tex
Processing code chunks ...
  1 : echo term verbatim (label=a)
  2 : echo term verbatim (label=c)
  3 : echo term verbatim (label=b)
  4 : echo term verbatim (label=d)

Error:  chunk 4 (label=d)
Error in eval(expr, envir, enclos) : Internal Sweave error

I did not find the cause of this problem, except that it occurs when 
Sweave is called on a file with named chunks. Note that the function 
Sweave works fine with the latest stable version of R (both R-2.12.1 and 
R-patched). And I found nothing about this problem in the NEWS file of 
the development version. I am not sure, but I wonder whether this might 
be a bug... could you confirm?

 > version
                _
platform       i686-pc-linux-gnu
arch           i686
os             linux-gnu
system         i686, linux-gnu
status         Under development (unstable)
major          2
minor          13.0
year           2011
month          02
day            06
svn rev        54234
language       R
version.string R version 2.13.0 Under development (unstable) (2011-02-06 
r54234)

 > sessionInfo()
R version 2.13.0 Under development (unstable) (2011-02-06 r54234)
Platform: i686-pc-linux-gnu (32-bit)

locale:
  [1] LC_CTYPE=en_US.utf8       LC_NUMERIC=C
  [3] LC_TIME=en_US.utf8        LC_COLLATE=en_US.utf8
  [5] LC_MONETARY=C             LC_MESSAGES=en_US.utf8
  [7] LC_PAPER=en_US.utf8       LC_NAME=C
  [9] LC_ADDRESS=C              LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] fortunes_1.4-0  lattice_0.19-13

loaded via a namespace (and not attached):
[1] grid_2.13.0


==============================
% file: toto.Rnw

\documentclass{article}
\usepackage{Sweave}
\begin{document}

<<a>>=
a <- 1
@

<<c>>=
b <- 1
@

<<b>>=
u <- 1:10
@

A test:

<<d>>=
<<a>>
<<b>>
<<c>>
@

\end{document}


-- 
Clément CALENGE
Cellule d'appui à l'analyse de données
Direction des Etudes et de la Recherche
Office national de la chasse et de la faune sauvage
Saint Benoist - 78610 Auffargis
tel. (33) 01.30.46.54.14



More information about the R-devel mailing list