Displaying 20 results from an estimated 700 matches similar to: "Sweave issue; keep.source=TRUE and cacheSweave incompatible?"
2010 Nov 07
1
Sweave: option keep.source=TRUE and package cacheSweave
Dear all,
When I use the cacheSweave package together with the Sweave option
keep.source = TRUE, all the LaTeX code before the Sweave code chunk is
included in the TeX file to be compiled. For example, with the
following Sweave file
\documentclass[12pt]{article}
\usepackage[nogin]{Sweave}
% Sweave options
\SweaveOpts{keep.source=TRUE, strip.white=TRUE, eps=FALSE, pdf=TRUE}
\begin{document}
2010 Mar 26
1
cacheSweave fails when used in conjunction with rjags
Hi all,
I use the excellent packages rjags and cacheSweave, and unfortunately
seem to have found an incompatibility between them. Below are a
minimal .Rnw file and corresponding JAGS model file which illustrate
the problem:
*** JAGS model file; name=j.bug ***
model {
mu ~ dnorm(0,1.0E-5)
sigma ~ dunif(0,100)
for(i in 1:length(y)) {
y[i] ~ dnorm(mu,sigma)
}
}
***
*** .Rnw
2009 Dec 07
0
Sweave, cacheSweave, and data frame
It's been a while since this thread appeared, but I had the same problem
and don't want to keep the solution for myself.
A small, reproducible example:
<<cache=true>>=
a=1
@
<<>>=
a+1
@
Compiling with cacheSweave gives an error:
> library(cacheSweave)
Lade n?tiges Paket: filehash
filehash: Simple key-value database (2.0-1 2008-12-19)
Lade n?tiges Paket:
2010 Feb 11
1
Sweve/cacheSweave
Hi there
I have a problem with using Sweave in combination with the option driver = cacheSweave.
Whichever code I try to run - when it comes to converting the tex file into pdf it comes up with the same errors (\csname \endcsname errors). Does anybody have an idea what it going wrong?
> Sweave("pgfSweave-example.Rnw",driver = cacheSweaveDriver)
Writing to file
2012 Jan 19
2
cacheSweave questions (usage and forward compatibility)
Hello all,
I would like to ask several questions regarding cacheSweave:
1) Is there a way to set "cache=true" globally? (I tried it
using \SweaveOpts but it didn't seem to work)
2) Is there a way to "flush" specific cache once it is created? (other
then erasing the entire cache directory)? Changing the code in the code
chunk seems to do it, but I am not sure to what
2013 Jan 29
1
Sweave files generating miktex errors
Dear useRs--
I have been using Sweave with miktex for years, but on a new install on
Windows XP, miktex seems to be hung up on single quotes. See example below.
Digging through stackexchange, I found using \usepackage[noae]{Sweave} in
the tex file solved the problem. My questions are:
--Why would this happen? I have the ae package installed.
--If inserting [noae] is the solution, how do I
2009 Jul 26
3
Sweave, cacheSweave, and data frame
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
2009 Jun 26
0
Modifying Sweave.sty to allow escapes with fancyvrb package in LaTeX
Dear Colleagues:
In an attempt to have things like # See page \pageref{this} inside
comments in R code chunks I have modified Sweave.sty as below. I have
followed fancyvrb's manual with regard to the use of the commandchars
argument. But when compiling with LaTeX (using attached test file) I
get a LaTeX error
(/usr/share/texmf-texlive/tex/latex/ae/t1aett.fd)
! Missing \endcsname
2010 Aug 13
2
cacheSweave / pgfSweave driver for package vignette
Dear list,
I wish to use a specific driver to process an sweave document in the
inst/doc directory of a package. Specifically, I would like to use
either cacheSweave or pgfSweave to speed up the creation of the
vignette which requires lengthy computations. The same request would
also apply to the highlight driver, to provide syntax highlighting of
R chunks.
In "writing R extensions" I
2010 Aug 13
2
cacheSweave / pgfSweave driver for package vignette
Dear list,
I wish to use a specific driver to process an sweave document in the
inst/doc directory of a package. Specifically, I would like to use
either cacheSweave or pgfSweave to speed up the creation of the
vignette which requires lengthy computations. The same request would
also apply to the highlight driver, to provide syntax highlighting of
R chunks.
In "writing R extensions" I
2008 Jul 27
2
Colors in Sweave
Hi list,
I was using Sweave and was wondering if anyone has had any luck changing the font colors of the code chunks. For instance, in my .Rnw preample I tried including:
===
\usepackage[usenames]{colors}
\definecolor{darkred}{rgb}{0.545,0,0}
\definecolor{midnightblue}{rgb}{0.098,0.098,0.439}
\DefineVerbatimEnvironment{Sinput}{Verbatim}{fontshape=sl,formatcom={\color{midnightblue}}}
2010 Dec 14
0
Sweave problem: lines repeated
Hi all
I'm having a problem when using Sweave. Here is a minimal example.
My input file (eg, test.Snw) looks like this:
<<TESTME,echo=FALSE, results=hide,fig=FALSE,keep.source=TRUE>>=
data(cars)
m1 <- lm( dist~speed, data=cars ); coef( m1 )
@
<<echo=TRUE,results=verbatim,fig=FALSE,keep.source=TRUE>>=
<<TESTME>>
@
<<TESTME2,echo=FALSE,
2010 Aug 04
1
Problem using R and Beamer...
Dear [R] and beamer community,
I am trying to build a presentation using beamer and [R]. I can Sweave the file; however, when I run pdflatex on the file i get the following error:
! FancyVerb Error:
Extraneous input `> a = 123450 > b = -0.69 \end {Sinput} \end {Schunk} \end {
beamer at frameslide}\ifbeamer at twoscreenstext \beamer at dosecondscreennow {{fragile}
\frametitle
2012 Jan 19
2
Sweave question - Setting Soutput code chunks to stay inside page margins?
Hello all,
Sometimes I get to make an R code chunk (in Sweave) which is longer then
the margins of the page. Is there a way to force it to "go to the next
line" (in Sweave) once that happens?
Here are two cases this happens in the resulting .tex file (one is a "hard"
case, and the other is simpler)
\begin{Schunk}
\begin{Sinput}
>
2013 Feb 09
1
Swaeve, Beamer and \alt
Hi,
I am having trouble getting \alt (or \altenv) to work with
Schunk/Sinput and was wondering if anybody had had success? With the
slide
\begin{frame}[fragile]\frametitle{Basic R}
\alt<2>{
<<echo=TRUE>>=
2+2
@
}{
<<echo=TRUE, eval=FALSE>>=
2+2
@
}
\end{frame}
I get the error message:
! FancyVerb Error:
Extraneous input `> 2+2 \end {Sinput} \end
2004 Sep 06
2
Sweave echoing comments (again)
Hello,
I try to document some R scripts for my collegues and observed the
problem, that Sweave strips comment lines away.
As a small example I write in an Rtex file:
\begin{Scode}
## a small example
test() # line comment
\end{Scode}
... the .tex file generated by Sweave only contains:
\begin{Schunk}
\begin{Sinput}
test()
\end{Sinput}
\end{Schunk}
... and all the comments are lost.
2004 Sep 06
2
Sweave echoing comments (again)
Hello,
I try to document some R scripts for my collegues and observed the
problem, that Sweave strips comment lines away.
As a small example I write in an Rtex file:
\begin{Scode}
## a small example
test() # line comment
\end{Scode}
... the .tex file generated by Sweave only contains:
\begin{Schunk}
\begin{Sinput}
test()
\end{Sinput}
\end{Schunk}
... and all the comments are lost.
2011 Feb 04
1
keep.source when semicolons separate statements on the one line
The following is 'semicolon.Rnw'
> \SweaveOpts{engine=R, keep.source=TRUE}
>
> <<xycig-A, eval=f, echo=f>>=
> library(SMIR); data(bronchit); library(KernSmooth)
> @ %
>
> Code for panel A is
> <<code-xycig-A, eval=f, echo=t>>=
> <<xycig-A>>
> @ %
Sweave("semicolon") yields the following 'semicolon.tex'
2008 May 18
1
Figure environment and includegraphics options from Sweave
Tha handy thinb about the fig=TRUE option in Sweave is that you do not
have to bother about filenames and starting and stpping the device.
I want the the resulting LaTeX to look as:
\begin{Schunk}
\begin{Sinput}
> x <- seq(-2 * pi, 2 * pi, 0.1)
> plot(x, cos(x), type = "l", lwd = 4)
\end{Sinput}
\end{Schunk}
\begin{figure}
\includegraphics[width=0.6\textwidth]{xx-001}
2010 May 13
1
Using Sweave in hostile environments
I'm trying to put together a poster using the LaTeX a0poster package and
including some things from pstricks to get gradient shading, etc.
The problem is that the default environments used by Sweave don't work
where I need them. A simple code chunk like
<<eval=FALSE>>=
x <- 1
@
buried in a minipage within a psshadowbox gives the error
Runaway argument?
> x <- 1