Displaying 20 results from an estimated 10000 matches similar to: "Sweave, white space and code blocks"
2007 Mar 15
1
Sweave bug using 'FDR' in chunk label (PR#9567)
Full_Name: Kevin Coombes
Version: 2.4.0
OS: Windows XP
Submission from: (NULL) (143.111.22.24)
I'm running R 2.4.0 on a Windows XP machine, with only the default packages
loaded.
Running Sweave or Stangle on the following Rnw file:
--------------
% bug.Rnw
\begin{document}
Demonstrate an Sweave/Stangle bug.
<<info>>=
sessionInfo()
@
<<getFDR>>=
x <- 1
@
2014 Mar 05
1
Sweave provides a misleading error when vignette engine not fully specified
Trying to Stangle / Sweave a file
$ cat vignette.Rnw
%\VignetteEngine{knitr}
\documentclass{article}
\begin{document}
\end{document}
results in a misleading error message:
~/tmp$ R CMD Stangle vignette.Rnw
Error: Vignette engine package not specified
Execution halted
when what is missing is the full specification knitr::knitr; 'vignette engine
package and function not specified' ?
2008 Nov 29
3
including Sweave tangled code in '.Rnw' document
Hello List,
I have been using Sweave for my homework this last quarter and have been
very impressed at how much time and effort it saves me. I, however, have
run up against a problem which I have not been able to solve using any of
the Sweave/LaTeX tricks I know. I work through my homework one problem at a
time, typesetting equations and writing R code, etc. and occasionally use
2010 May 20
2
Sweave and uttf-8 under Windows XP
Hi list,
I need to process a Rnw file and and a csv file (both are encoded in
UTF-8) under Windows XP (R Version 2.11.0, i386, mingw32).
I can source and run the Rnw file:
> Stangle("Bericht.Rnw")
Writing to file Bericht.R
> source(file("Bericht.R", encoding="UTF-8"))
which runs fine, but running Sweave() failed:
> Sweave("Bericht.Rnw")
2011 Jul 16
2
Sweave in 2.13.1
I run Windows XP.
and in a command window I get:
> c:\stat\r\R-2.13.1\bin\i386\Rcmd Sweave Lexis.rnw
Error in length(arg) : 'arg' is missing
Calls: <Anonymous>
Execution halted
AND:
> c:\stat\r\R-2.13.1\bin\i386\Rcmd Sweave --help
Error in length(arg) : 'arg' is missing
Calls: <Anonymous>
Execution halted
BUT:
> c:\stat\r\R-2.13.0\bin\i386\Rcmd Sweave
2007 Apr 16
1
Sweave.sh shell script on CRAN
Dear developeRs,
Martin Maechler has suggested that I resend this email to R-devel
instead to R-packages for further comments and potential availability
for Windows.
----------------------------------------------------------------------
I have uploaded my Sweave (bash) shell script on CRAN. It is available at
http://cran.r-project.org/contrib/extra/scripts/
In short this script runs Sweave on
2009 Sep 08
1
makefile for sweave
Hello, I have the following makefile. The problem is that the bibliography
doesn t work. Any help would be appreciated! I really don t don t what to
do..:-(
# The sources of the report (tex, Rnw and other files (e.g. bib, idx))
TEX_CMPS = Report problem
RNW_CMPS = prop1 prop2 ExeExps
OTHER = Report.bib
# The name of the report to produce
all: Report.pdf
code: $(RNW_CMPS:=.R)
clean:
rm
2002 Nov 04
2
Sweave - documenting a long function
Hi,
I would like to use Sweave to document a long function.
Is it possible to split the function's code into chunks
such that Sweave will accept each chunk without complaining.
I have tried various approaches without sucess
but I feel sure that someone has done this already.
Here is one attempt
==============
% First, define the funciton header
<<defFunHdr, eval=FALSE>>=
x <-
2007 Jun 28
4
Sweave bug? when writing figures / deleting variable in chunk
I have found a quite strange (to me) behaviour in Sweave. It only
occurs in the following situation:
1. define a variable in one chunk
2. use it within a subsequent figure-generating chunk
3. delete it at the end of that same chunk
Then the Sweave driver chokes, not finding the variable name when
generating the figure
Example:
% document bug2.Rnw
\documentclass{article}
\usepackage{Sweave}
2008 Oct 13
1
MiKTEX-texi2dvi
Sorry, I forgot to include a reproducible example on my last e-mail but here it is: Since the file is large to be included here:
The path to the foo.Rnw examples is:
www.stat.umn.edu/~charlie/Sweave/foo.Rnw
and is suppossed to produce a pdf like this one:
http://www.stat.umn.edu/~charlie/Sweave/foo.pdf
I have downloaded MiKTEX but I don't know how to make it work. Sweave and Stangle seem to
2014 May 30
1
R CMD check for the R code from vignettes
Hi,
Recently I saw a couple of cases in which the package vignettes were
somewhat complicated so that Stangle() (or knitr::purl() or other
tangling functions) can fail to produce the exact R code that is
executed by the weaving function Sweave() (or knitr::knit(), ...). For
example, this is a valid document that can pass the weaving process
but cannot generate a valid R script to be source()d:
2007 Mar 06
1
Stangle and annotate
How exactly should I go about turning off annotation when running
Stangle (Rtangle) with "R CMD Stangle myfile.Rnw"?
Ideally I would like to be able to turn annotation off and on for
individual code chunks, or maybe better, to annotate only named
chunks. Are either of these things easily done?
Is there some way to figure out this sort of thing without reading
through the source code
2010 Apr 08
1
texi2dvi runs but produces no output
I am working on a Windows XP machine with R 2.10.1 and a recent
installation of MiKTeX 2.8. I use LyX (www.lyx.org) to write documents
and have it set up to run Sweave, Stangle, and make the PDF through R
using a batch script and a MakeSweave.R file. This system worked just
fine until I ran some MiKTeX updates yesterday. This is a bit
embarrassing as I helped produce a "How-to" guide to
2010 May 05
3
Latex and Stangle()
Hi,
I'm using the Sweave and I would like include codes of the R
in my LaTeX file.
I extracts the R code with Stangle (), whose name is
Relatorio.R but I can't include it
in the Latex file as an appendix.
Suggests?
Thanks,
--------------------------------------
Silvano Cesar da Costa
Departamento de Estat?stica
Universidade Estadual de Londrina
Fone: 3371-4346
2007 May 18
1
How to extract R codes that embedded in a HTML file
> -------- Original Message --------
> Subject: Re: [R] How to extract R codes that embedded in a HTML file
> using Stangle?
> Date: Thu, 17 May 2007 17:01:30 +0000
> From: Tao Shi <shitao at hotmail.com>
> To: ligges at statistik.uni-dortmund.de, lecoutre at stat.ucl.ac.be
> CC: r-help at stat.math.ethz.ch
> : <jmcconnell at
2004 Aug 09
5
AW: built-in Sweave-like documentation in R-2.x
> See the 'Writing R Extensions' manual, specifically
> Creating R Packages -> Writing package vignettes
thank you, i saw this entry. However, this entry is rather
about how to include documents (in particular Sweave-based)
into a package. But I have meant smth else.
Let me explain in example. Today I use emacs as
environment for my R-sessions. I am quite happy to
use
2007 Apr 07
1
bug in Stangle(split=TRUE)
[I originally emailed this to Friedrich Leisch but got no response and I
just wanted to make sure it made it in before release.]
While working with Stangle(), I noticed a problem when using 'split =
TRUE'. Particularly, when there are two chunks where one chunk's name
is a prefix of another chunk's name, then the two chunks will be written
to a single file rather than two
2014 Nov 13
3
Changing style for the Sweave vignettes
As a user, I am always annoyed beyond measure that Sweave vignettes
precede the code by a command line prompt. It makes running examples
by simple copying of the commands from the vignette to the console a
pain. I know the idea is that it is clear what is the command, and
what is the output, but I'd rather precede the output with some kind
of marking.
Is there any other solution possible /
2013 Sep 02
1
Sweave: printing an underscore in the output from an R command
I am working with Sweave and would like to print out into my latex document the result of the R command
version$platform
So what I first tried in my .Rnw document was \Sexpr{print(version$platform)}.
However, the output from this command is the string "x86_64-apple-darwin10.8.0" (without the quotes). This contains an underscore, which is a special character in tex and so I get an error
2007 May 16
1
Problem with Sweave
I am using R 2.5 on a Linux Redhat platform. I can successfully run some
example *.Rnw files through Sweave and generate pdf files. When I try my
own example file, "test.Rnw":
\documentclass[a4paper]{article}
\title{Test Sweave Example}
\author{Thomas Adams}
\begin{document}
\maketitle
In this example we embed parts of the examples from the
\texttt{boxplot} and \texttt{lattice}