similar to: Latex error with Sweave example

Displaying 20 results from an estimated 2000 matches similar to: "Latex error with Sweave example"

2008 Jun 17
3
Sweave: problem with usepackage{C:/PROGRA~1/R/R-27~1.0/share/texmf/Sweave}
R users, I'm at a loss with a problem considering running .tex files produced by Sweave. When I run (R 2.7.0): --------------------------------------------------- #Taken from ?Sweave testfile <- system.file("Sweave", "Sweave-test-1.Rnw", package = "utils") ## enforce par(ask=FALSE) options(device.ask.default=FALSE) ## create a LaTeX file Sweave(testfile)
2005 Jun 16
1
Sweave and sideways
Hi there, I'm rying to 'turn' an Schunk in an .Rnw file(Xemacs-21.4.13, ESS-5.2.8, R-2.1, miktex-2.4.1705). Has anyone got the isorot package to work with Sweave? JC example test.Rnw: \documentclass[a4paper]{article} \usepackage{Sweave} \usepackage{isorot} \rotdriver{dvips} \clockwise \title{Sweave Example 1} \author{apologies to Friedrich Leisch } \begin{document} \maketitle
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
2007 Oct 07
5
how to use \Sexpr{} with sweave
I'm trying to learn Sweave. So far things are going well with the chunks of code identified by << >>= But I'm having trouble with the in-line text use of \Sexpr. Here is a short example .Rnw file: \documentclass[12pt]{article} \usepackage[margin=1.25in]{geometry} \usepackage{graphicx} \usepackage{Sweave} \begin{document} <<test>>= pnorm(1) @ \Sexpr{2+6}
2005 Oct 02
1
Problem Sweaving vignettes: MiKTeX's texi2dvi reports errors
Hi, I am trying to create a Bioconductor package. Everything installs and checks fine. Now I'm on my last step, which is to create a vignette. I'm trying to test the Sweave process, to make sure I can build a vignette. I am stuck at the texi2dvi stage, which fails when I try to process the example Sweave-test-1.tex file. I am using Windows binary R distributions, and have the same
2008 Feb 25
3
How to include the documentation of a function in a Sweave document?
Dear R-help, I would like to include the documentation of an R function in an *.rnw document processed by Sweave. Because I'm sharing my *.rnw files with colleagues under Linux and Windows (I'm on Mac OS X), I would like a pure R solution. The naive approach doesn't work, because Sweaving this *.rnw file: -------- tmp.rnw -------- \documentclass{article} \begin{document}
2009 Mar 17
1
Combining Sweave and fancyvrb
I find Sweave very useful and I was trying to combine it with the latex package fancyvrb. I was trying to get line numbering and labels in order to reference the lines where particular commands occur. Unfortunately, I haven't been able to figure out how to do it. Maybe somebody can help me. The following is a sample Rnw file: the first part shows what I would like to get, the second what 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}}}
2008 Mar 24
2
Newbie help with Sweave
I think I've gotten my Emacs/Sweave/R system set up correctly, thanks to Vincent and Jim, but I haven't been successful getting my first document produced. I'm trying to use one of Friedrich Leisch's examples, http://www.ci.tuwien.ac.at/~leisch/Sweave/example-1.Snw. I cut and pasted the text into a document sweaveexample.Rnw in Emacs. It seemed to be processed successfully with R:
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} >
2010 Oct 05
3
SweaveInput + keep.source = TRUE trouble
Dear all, I have trouble with R-beta sweaving files that include definitions with \SweaveInput in combination with keep.source = TRUE Symptom: SInput is taken from too far down the input file (the shift is the number of lines of the included file). Is that known? Searching didn't turn up anything, yet I think there are more people than just me using keep.source. Example: $
2012 Aug 21
2
Sweave: R chunk inside caption?
Hi Folks, I'm surprised, but I didn't find this question addressed anywhere. I'd like to generate a LaTeX caption with R code. I've tried the code below, but I get the following TeX error: ! Argument of \@caption has an extra }. <inserted text> \par l.21 } Any thoughts? Perhaps I'll have to write the "\caption{}" text with R? thanks!
2009 Oct 13
2
Sweave output encoding in R-2.10.0beta on Windows (Rgui <-> Rterm)
Dear developers, I have come across a (somewhat strange) change in the encoding of Sweave output from R-2.9.2pat to R-2.10.0beta (apparently specific to Rgui) on Windows installations. Of course, the NEWS file contains quite a few changes concerning encoding, but I was not able to locate an entry which explains the observed behaviour. I am not very familiar with encodings/locales/codepages,
2008 Feb 27
2
Sweave produces gibberish instead of apostrophe in pdf
Dear All, I try to use Sweave to make a document. But when I use the Sweave() command on it and build a pdf with pdflatex (3.141592-1.40.3) my apostrophes are replaced by some gibberish (an 'a' with a hat on it, a capital A with a arc pointing upwards on it and a capital Y with two points on it). If I manually replace the apostrophes using the keyboard, I get a different looking
2006 Jul 31
1
Sweave error in example code
Hi.. I am running R version 2.3.1 on a Windows XP machine with the latest Miktex 2.5 installed. I get no errors from R when running the Sweave example, testfile <- system.file("Sweave", "Sweave-test-1.Rnw", package = "utils") However, when I tex the resulting .tex file (after installing a4.sty) I get the error below. This is pdfeTeX, Version
2009 Apr 19
2
Sweave: Changing the background color, adding a border
Hi all, I am using Sweave to produce a document. Unfortunately, I have to print several copies and I can't print them in color. So I would like to change the way of printing the code. I would like to print the code in a box with a black borderline and a grey background (quite classic). Is it possible to do it by changing some Schunk options? Christophe
2004 Dec 20
3
Sweave and LaTeX beamer class
Hi, has anyonne experienced problems between the LaTeX beamer class and Sweave? The following code does not work properly: ################################# \documentclass{beamer} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage{ngerman} \begin{document} \frame{ \frametitle{test} test <<>>= 1+1 @ } \end{document} ################################# Below is the
2012 Feb 23
1
Sexpr not getting expanded in Sweave
An Sweave file, 'test.Rnw': \documentclass{article} \title{Sweave minimal} \author{MK} \begin{document} \maketitle We try Sweave: <<1>>= data(airquality) summary(airquality) x <- airquality[1, 1] @ I try Sexpr: \Sexpr{x} We plot: \begin{center} <<2, fig=TRUE, echo=FALSE >>= boxplot(Ozone ~ Month, data = airquality) @ \end{center} \end{document} I check the
2006 Jul 25
2
Sweave and tth
I tried odfWeave to create an OpenOffice file and found that it exhausted the memory of my large linux machine and took a long time to run. LaTeX with Sweave is blazing fast and extremely flexible. Most of the time I can give clients a pdf file. Sometimes I'd like to make Sweave LaTeX files more accessible (and editable) to (gulp) Word users, mainly so they can extract tables and other
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