[R] Sweave, cacheSweave, and data frame

Gabor Grothendieck
2009-07-26T03:56:50Z

Another thing you can do to save time is to use the --no-vignettes switch
when you build the package.

On Sat, Jul 25, 2009 at 11:05 PM, Shige Song<shigesong at gmail.com>
wrote:
> Dear All,
>
> I have been using Sweave (mainly via the Sweave.sh script) and really like
> it. I am working a paper (using Sweave, of course) which includes several
> time-consuming computations, and it gets tedious to re-compile the whoel
> thing every time I made changes. Then I discover the
"cacheSweave" package,
> which seems the right solution to my problem. I only have on problem. Here
> is what I did:
>
> ----------------------------------------------
> <<results=hide,echo=false>>> library(foreign)
> library(Zelig)
> library(memisc)
> options(digits=4)
> @
>
> <<echo=false>>> d <-
read.dta("~/project/abortion/data/data_transition_wide.dta")
> @
>
> ...
>
> ----------------------------------------------
>
> It can be compiled using "Sweave.sh foo.Rnw", but when I tried
"Sweave.sh -c
> foo.Rnw", I got error message:
> ?"...Processing code chunks ...
> 1 : term hide
> Error in data.frame(chunk = options$label, chunkprefix = chunkprefix, ?:
> ?arguments imply differing number of rows: 0, 1"
>
> I thought it might be an imcompatibiltiy problem between the cacheSweave
and
> the foreign packages, but the problem was still there when I tried to read
> the data in using "read.table" function.
>
> Any ideas? Many thanks.
>
> Best,
> Shige
>
> ? ? ? ?[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>