search for: schunks

Displaying 20 results from an estimated 73 matches for "schunks".

Did you mean: chunks
2004 Mar 12
4
Sweave and R output: possible to suppress "Schunk" tags in *.tex file output?
Hello, I would like to fill the rows of a Latex tabular environment with output from R, as in \begin{table} \caption{Table caption.} \label{tab:events} \begin{tabular}{c r r r r r} \hline <<echo=false,results=tex>>= fill.my.table.rows() @ \end{tabular} \end{table} Sweave produces the output inside \begin{Schunk} and \end{Schunk} commands, which latex doesn't
2009 Feb 20
1
Sweave schunk placement
Dear Professor Leisch + R helpers, For the past few days I have been trying to figure out why the LaTeX endfloat package is not working with Sweave. I figured it out, and it's trivial: The endfloat package requires that \begin{table} and \end{table} commands are on their own line. But Sweave is writing LaTeX code like \end{table}\end{Schunk} which causes endfloat to choke. Simply moving the
2005 Aug 05
3
Latex error with Sweave example
I created a tex file following the example in the Sweave help which produced the following files in my working directory. Sweave-test-1-006.eps Sweave-test-1-006.pdf Sweave-test-1-007.eps Sweave-test-1-007.pdf Sweave-test-1.tex When I run latex on this, I get a latex error, log file below. I am running R 2.1.1 on Windows XP. I have installed "small MiKTeX" and I have added
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} >
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}}}
2004 Jan 08
2
Sweave & xtable
I am just starting to learn Sweave (really neat tool). I am pretty early in the learning curve (I had to think a moment ago whether a # or % was the appropriate comment character). I have successfully incorporated simple graphics and outputs, but am having trouble getting a latex (xtable) table to function properly. Latex is seemingly treating the xtable code as input or verbatim text. That
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!
2005 Jan 02
2
How to quieten axis() for Sweave: avoid echoing NULL?
Dear R-community, I'm using Sweave to produce reports. The reports require the "axis" command. When I run axis the program returns NULL as well as creating the axis. > plot(1:4, rnorm(4), axes=FALSE) > axis(1, 1:4, LETTERS[1:4]) NULL > So, my Sweave tex files have \begin{Schunk} \begin{Soutput} NULL \end{Soutput} \end{Schunk} in front of each graphic that requires
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}
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)
2010 Dec 22
1
Error in generating sweave-tex -> pdf file
Hi, I created a Sweave file (see below). when I want to convert tex file generated from it into pdf, I get error message as follows: > texi2dvi("test.tex", pdf=TRUE) Error in texi2dvi("test.tex", pdf = TRUE) : Running 'texi2dvi' on 'test.tex' failed. LaTeX errors: ! Undefined control sequence. l.8 \begin {Schunk} ? ! Interruption. !
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: $
2008 Sep 06
2
Sweave and/or beamer issue
Dear Friends, I not sure whether this is an Sweave or a beamer problem. The Rnw file: \documentclass[compress,smaller]{beamer} %\documentclass{article} %\usepackage{beamerarticle} \usepackage{Sweave} \title{Psychophysics II} \date{September 9, 2008} \begin{document} \frame{ \begin{Schunk} \begin{Sinput} > ro <- 0.2 > c <- seq(from = -3, to = 4, by = 0.1) > fn <- 1 -
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.
2010 Sep 11
0
Sweave issue; keep.source=TRUE and cacheSweave incompatible?
This could well be a package-specific issue, and so perhaps not for R-devel. The author of the relevant package is CC'd in any event. I'm seeing some odd behavior from Sweave with keep.source=TRUE when using driver=cacheSweaveDriver from the cacheSweave package. It would seem that code chunks with keep.source=TRUE aren't being parsed correctly; the corresponding Schunk starts at
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'
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
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,
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