search for: sweaveopts

Displaying 20 results from an estimated 74 matches for "sweaveopts".

2009 Jul 23
1
SweaveOpts(eval=false) not working - CORRECTION
...ou please refer >> me to a mora appropriate? >> >> My question: >> >> I am using sweave (in LyX with beamer) for a lecture and I would like >> to evaluate the R code chunks for the handout, but not for the >> presentation. >> I thought that I can use \SweaveOpts(eval=FALSE) to set this option >> for all code chunks, but it is still evaluating them and showing the >> output. If I set this option separately for each chunk(i.e. >> <<eval=FALSE>>=), it is, as expected, not evaluating. >> >> Am I doing something wrong h...
2010 Nov 25
1
\Sweaveopts error
I have a file 4lmetc.Rnw, intended for inclusion in a LaTeX document, that starts: \SweaveOpts{engine=R, keep.source=TRUE} \SweaveOpts{eps=FALSE, prefix.string=snArt/4lmetc} The attempt to process the file through Sweave generates the error: > Sweave("4lmetc") Writing to file 4lmetc.tex Processing code chunks ... 1 : keep.source term verbatim Error in file(srcfile$filename, o...
2009 Jan 20
2
Sweave: conflict between setwd and \SweaveOpts{prefix.string=}
Hello I think there is a conflict between setwd() and \SweaveOpts{prefix.string=}. In the same document, those both command get Sweave confuse the files and directories. See: say my .Rnw document is in File1 If one inserts some setwd() for another file: -setwd(File2) then the command \SweaveOpts{prefix.string=graphics/Rplots} will search the "graphics&q...
2011 Apr 14
1
trouble with \SweaveOpts{grdevice=...}
Dear all I've just tried the brand new 'grdevice' option in Sweave but couldn't make it work. When I declare \SweaveOpts{grdevice=pdf} or \SweaveOpts{grdevice=cairo_pdf} trying to plot something simple <<fig=T, echo=T>>= plot(1:10,1:10,main='Some title') @ would result in an Sweave error: 18:16:47.299: 1 : term verbatim 18:16:47.308: 2 : echo term verbatim pdf pdf 18:16:47.391: Error in dev(n...
2010 Dec 10
1
Sweave: Setting options with SweaveOpts{} when using driver=RweaveHTML
When using Sweave in connection with the driver RweaveLatex(), global options can be set with \SweaveOpts{}, e.g. \SweaveOpts{keep.source=T}. Does anybody know if it is possible to set global options in the same way when using Sweave with the driver RweaveHTML(). Regards Søren [[alternative HTML version deleted]]
2009 Jun 25
1
Setting default plot size in Sweave
Dear Colleagues: I have used \SweaveOpts{prefix.string=plot, eps = FALSE, pdf = TRUE} \SweaveOpts{width=5, height=4} <<fig=T>>= plot(...) @ But the figure still has a width of 80% of the text width, the default set up by Sweave, which issues a LateX command in Sweave.sty of \setkeys{Gin}{.8\textwidth}. Sweave.sty has a co...
2011 Mar 07
2
Sweave with scan()-ed data
...m}{formatcom={\color{Sinput}},fontsize=\footnotesize,baselinestretch=0.9} \DefineVerbatimEnvironment{Soutput}{Verbatim}{formatcom={\color{Soutput}},fontsize=\footnotesize,baselinestretch=0.85} \DefineVerbatimEnvironment{Scode}{Verbatim}{formatcom={\color{Scode}},fontsize=\small} \begin{document} \SweaveOpts{engine=R,height=6,width=6,results=hide,fig=FALSE,echo=TRUE} \SweaveOpts{prefix.string=fig/sem} \section{sem package: Second-order CFA, Thurstone data} \begin{frame}[fragile] \frametitle{sem package: Second-order CFA, Thurstone data} \framesubtitle{Data} Data on 9 ability variables: <<...
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 extent. For example - if I add at the end of the code chunk a n...
2010 Nov 07
1
Sweave: option keep.source=TRUE and package cacheSweave
...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} Blabla. <<optionsR, results=hide>>= setCacheDir("./cache") library(MASS) ## just an example @ \end{document} I get the following TeX file: \documentclass[12pt]{article} \usepackage[nogin]{...
2009 Aug 07
2
xtable, sweave and resizebox
does anyone know to rezize a table produzed by xtable? The size of my table is too big and I would like to resize it like using resizebox but it gives an erros when I try using it using it its fine \SweaveOpts{echo=false} <<results=tex>>= xtable(stats0,caption='Número de transacções dos artigos frequentes e infrequentes',label='tab:INEStats') @ but the size is too big so I try <<echo=False,results=hide>>= load('stats.Rdata') library(xtable) \resizebox{\t...
2009 Apr 14
1
using Sweave, how to save a plot in a given size
Hi, I'm trying to realise a repport with R and Latex (TeXnicCenter and Miktex for Windows) using Sweave(). I'd like to save my plots in a given size. How can I do that ? The code is : \SweaveOpts{prefix.string = figs/plot, eps = FALSE, pdf = TRUE} <<partI, echo=FALSE ,fig=TRUE, include=FALSE>>= plotFunction() @ \includepdf[pages=-]{figs/plot-partI} When I use par(pin=c(width,height)), I get the plot with the right size but saved in a too big pdf page (7in x 7in, the default s...
2008 Nov 22
1
declaring constants in an Sweave / LaTeX document
List, I would like to set a variable to hold, say, the size of my plots in a Sweave document. i.e. something like the following in my '.Rnw' file: ============================================================================== smallPlotSize = 4 <<fig1, echo=false, results=hide, height=smallPlotSize, width=smallPlotSize, fig=true>>= dat <- read.table("
2009 Sep 03
1
Sweavelistingutil: Encoding problems
...this: ,---- | \documentclass[a4paper]{scrartcl} | \usepackage{scrpage2} | \usepackage[english,danish]{babel} | \usepackage[T1]{fontenc} | \usepackage[utf8]{inputenc} `---- And the "R-settings" looks like this (basically copied from the viginette): ,---- | %\usepackage[noae]{Sweave} | \SweaveOpts{keep.source=TRUE} | % ------------------------------------------------------------------------------- | <<SweaveListingsPreparations, results=tex, echo=FALSE>>= | require(SweaveListingUtils) | SweaveListingoptions(intermediate = FALSE) | SweaveListingPreparations(ae = FALSE) | setToBeDe...
2015 Jun 09
3
Tablas con tabular en latex
...weave) a través del paquete tables. He mirado que este tema esta activo en las listas pero no logro localizar las respuestas antes dadas, por eso lanzo esta consulta. Mi fichero .rnw tiene el siguiente aspecto: ******* \documentclass{article} \usepackage{array,booktabs,caption} \begin{document} \SweaveOpts{concordance=TRUE} \include{math} <<echo=TRUE>>= save.image() load("./.RData") library("tables") library("xtable") attach(lfebrero) @ \section*{Informe} \subsection*{Llamadas por dia} <<echo=TRUE,results=tex>>= tabular(FECHA_LLAMADA ~ 1, data=...
2009 Jun 19
2
Changes to Rd handling in R-devel
I've just committed some fairly big changes to R-devel. - There's a new tag \Sexpr which allows R code to be embedded within the Rd file, similar to Sweave, \RdOpts corresponds to \SweaveOpts. - The parser now mainly issues warnings, rather than errors, in case of syntax errors. It throws away a few tokens and tries to restart. This should let you see most of your errors in one pass, rather than one at a time. (Don't ignore the warnings -- you've lost some of your file...
2009 Apr 13
2
I want to use Sweave, but only sometimes
.... Here's why I think this must be possible. In this list, I saw one of you explain this approach to working with figures in Sweave docs: Instead of using the automatic figure inclusion approach like this: <<testfn2, fig=true>>= curve(sin, from = 1, to = 55) @ Do this instead: \SweaveOpts{prefix.string=foo/bar} <<testfn2, fig=true, include=false>>= curve(sin, from = 1, to = 55) @ \begin{figure} \caption{My Figure} \includegraphics{foo/bar-testfn} \end{figure} As long as the figures are saved in the directory foo, then LaTeX will find them, I think (hope!). Then if...
2010 Oct 05
3
SweaveInput + keep.source = TRUE trouble
...devel.tex && R CMD Sweave baseline.Rnw && mv baseline.tex baseline.2.11.tex && diff -u baseline.2.11.tex baseline.devel.tex gives: --- baseline.2.11.tex 2010-10-05 11:33:49.000000000 +0200 +++ baseline.devel.tex 2010-10-05 11:33:49.000000000 +0200 @@ -83,7 +83,7 @@ \verb+\SweaveOpts{keep.source = TRUE}+ \begin{Schunk} \begin{Sinput} -> 12 +> line 54 \end{Sinput} \begin{Soutput} [1] 12 @@ -106,7 +106,7 @@ line 63 chunk option keep.source = TRUE \begin{Schunk} \begin{Sinput} -> 14 +> line 67 \end{Sinput} \begin{Soutput} [1] 14 I used yesterday&...
2012 Aug 20
2
Changing line length in Sweave output works for numeric, but not for character vectors
...This works great for me for numeric output, but not for character vectors that I have to print. The following is some sample code that illustrates my problem. Is there a different way to format character vectors that are stored in R? Yours, Simon Kiss \documentclass{article} \begin{document} \SweaveOpts{concordance=TRUE} <<echo=TRUE, results=verbatim>>= seq(1,100,1) @ <<echo=TRUE, results=verbatim>>= options(width=30) @ <<echo=TRUE, results=verbatim>>= seq(1,100,1) @ <<echo=TRUE, results=verbatim>>= test<-c('The government should do more to...
2009 Jul 13
3
SweaveListingUtils question
...some technical reason, I would like to stick on this notation. Any help appreciated, kind regards, Karsten. %%%% begin example \documentclass[9pt]{beamer} \usepackage{fancyvrb} \usepackage{listings} % choose language and char set \usepackage[ngerman]{babel} \usepackage[ansinew]{inputenc} % \SweaveOpts{prefix.string=Routput/parcel, keep.source=TRUE} \begin{Scode}{results=tex, echo=FALSE} require(SweaveListingUtils) SweaveListingoptions(intermediate = FALSE) SweaveListingPreparations() \end{Scode} \begin{document} \begin{frame}[fragile] \frametitle{Your title} \begin{lstlisting}options(digit...
2019 Jun 18
1
making a vignette optional
I had added a vignette to the coxme package and all worked well locally, but it failed at CRAN.???? The issue is that the vignette involves using coxme for pedigree data, it doesn't work without the kinship2 package, and I hadn't put in the necessary "if (require(...." logic. The question is, how do I make the entire vignette conditional? If the package isn't available,