similar to: sweave options with variable

Displaying 20 results from an estimated 2000 matches similar to: "sweave options with variable"

2004 Jun 25
2
Sweave: R code in self defined TeX-commands
Hi, I need to produce a standard report for several variables in Sweave and thus would need the possibility to define a TeX-command which includes R-code like \newcommand{\meansd}[1]{The mean is \Sexpr{mean(#1)} and the standard deviation is \Sexpr{sd(#1)} . } and then just write \meansd{age} in the latex code to get the whole sentence. The above does not work, since
2013 Aug 28
1
Error when using buildVignettes()
Dear all, When running function 'testQAReport()', which uses function 'buildVignettes()' to create a pdf-file I get the following error: > source("testQAReport.R") > testQAReport() Error in .get_package_metadata(pkgdir) : Files 'DESCRIPTION' and 'DESCRIPTION.in' are missing. Since I did not get this error in earlier versions of R, could you
2005 Jul 19
1
translation with Rd.sty, Sweave and tex4th (PR#8016)
Full_Name: Paulo Ribeiro Version: 2.1-1 OS: Debian Linux Submission from: (NULL) (200.103.144.24) I'm using Sweave with tex4th to generate xhtml documents from documents created using Sweave which include \usepackage{Rd} in the preamble However there seems to be a problem with \Link defined in Rd.sty, since this is also defined in tex4ht.sty My workaround was to replace the lines with
2010 Aug 07
0
several figures from one Sweave chunk? [solved]
(on-list) Hello Cameron On Fri, 6 Aug 2010 19:02:22 +0100 Liviu Andronic <landronimirc at gmail.com> wrote: > On Fri, 6 Aug 2010 11:30:59 -0600 > Cameron Bracken <cameron.bracken at gmail.com> wrote: > > There is no real good way to deal with this in Sweave. Sweave does > > not actually know anything about the graphics it is creating, all > > it knows it that a
2008 Jun 13
4
Sweave: looping over mixed R/LaTeX code
Dear guRus, I would like to loop over a medium amount of Sweave code, including both R and LaTeX chunks. Is there any way to do so? As an illustration, can I create a .tex file like this using a loop within a .Rnw file, where the "1,2,3" comes from some iteration variable in R? ################################################ \documentclass{article} \usepackage{Sweave} \begin{document}
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
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}
2005 Jan 13
1
Setting the width and height of a Sweave figure
Hello R-people, I have a function which plots two figures next to each other using if(dev.cur()==1) x11(width=14,height=7) to create a new window and set the size of the window automatically if no device is open. This works fine in interactive mode but I don't know how Sweave gets the parameters for the figures, and right now the default behavior causes this figure to be square and the
2005 Jan 06
2
autoscaling plot font size in Sweave output possible?
Hi, I was wondering if it's possible to have fonts in plots to be autoscaled to the same font size used by LaTeX in a surrounding Sweave document. Here's a short example in which the fonts of the first plot are barely readable: --8<------------------------schnipp------------------------->8--- \documentclass{article} \usepackage{graphicx} \newcommand{\mytext}{Some normal sized
2012 Apr 04
3
Rgui maintains open file handles after Sweave error
Hello Folks, When I run the document below through sweave, rgui.exe/rsession.exe leaves a file handle open to the sweave-001.pdf graphic (as verified by process explorer). Pdflatex.exe then crashes (with a Permission Denied error) because the graphic file is locked. This only seems to happen when there is an error in the sweave document. When there are no errors, no file handles are left open.
2008 Mar 07
3
R-Logo in \LaTeX (Mag. Ferri Leberl)
Dear Mag. Ferri Leberl, I'm using something like: ----------------------- tex.tex --------------------------- \documentclass{article} \usepackage{graphicx} \usepackage{fancyvrb} \newcommand{\Rlogo}{\protect\includegraphics[height=1.8ex,keepaspectratio]{Rlogo.pdf}} \newcommand{\myinput}[1] {\begin{scriptsize} \VerbatimInput[frame=single,label=#1]{#1} \end{scriptsize}} \title{The R logo,
2008 Mar 07
3
R-Logo in \LaTeX (Mag. Ferri Leberl)
Dear Mag. Ferri Leberl, I'm using something like: ----------------------- tex.tex --------------------------- \documentclass{article} \usepackage{graphicx} \usepackage{fancyvrb} \newcommand{\Rlogo}{\protect\includegraphics[height=1.8ex,keepaspectratio]{Rlogo.pdf}} \newcommand{\myinput}[1] {\begin{scriptsize} \VerbatimInput[frame=single,label=#1]{#1} \end{scriptsize}} \title{The R logo,
2008 Nov 14
1
Line breaks in mathematical formulae in Rd files (PR#13287)
Hi, This is a problem about writing R documentation (R-exts 2.6). The command "\deqn" defined in "Rd.sty" is: \newcommand{\deqn}[2]{\[#1\]} which will put mathematical formulae in the "displaymath" environment; that means line breaks are not allowed (or will not be shown) in formulae, but sometimes we do need multiple lines of formulae. One solution is to write
2018 May 25
2
Rd parser throws error for user macros invoked with empty argument
While on the topic of Rd macro arguments, it seems that if a multiline argument is supplied, the lines after the first are silently ignored: f <- tempfile() mac6 <- "\\newcommand{\\mac6}{mac6: #1}" cat(mac6, "\\mac6{2*3 2+2 sin(pi) }\n", file = f) rd <- tools::parse_Rd(f) > rd mac6: 2*3 --- Georgi Boshnakov -----Original Message----- From: Tomas Kalibera
2006 Sep 25
3
Best use of LaTeX listings package for pretty printing R code
This is what I have been using. Does anyone have a better way? In particular I would like to see letters in comment strings not stretched so much. Thanks -Frank \documentclass{article} \usepackage{listings,relsize} \lstloadlanguages{R} \newcommand{\lil}[1]{\lstinline|#1|} \begin{document} \lstset{language=R,basicstyle=\smaller,commentstyle=\rmfamily\smaller, showstringspaces=false,%
2004 Jul 29
2
expression + paste + arguments + ...
dear R wizards: I would like to write a function that roughly places the equivalent of the following latex text into the current plot: \newcommand{ \placesigma }[4]{ \put(\#1,\#2){ \sigma_{A , #3} = #4 } I cannot figure out how to do this. I know I have to use a function that uses expressions in a text() invoke. But passing arguments and nesting strings and expressions has so far not
2009 Apr 13
2
I want to use Sweave, but only sometimes
Does anybody have a workable system to run an Rnw document through R-Sweave when necessary, but to just run it through LaTeX if no new R calculations are needed? I.e., the figures already exist, I do not need R to do more work for me, so I send the document straight to LaTeX. I want to leave open the option that I might need to run the document through Sweave in the future, so I don't want
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("
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
2002 Nov 13
1
Package documentation and rd.sty
Hi all, I've got a basic question regarding package documentation and rd.sty. I wrote my first own package, and now I would like to place the documentation into the appendix of another LaTex document. Seemingly I cannot simply \usepackage{Rd}, as this will modify the page-settings of my document. Is there a minimum style file which will just define the environments and commands needed for