Displaying 20 results from an estimated 20000 matches similar to: "Sweave Chunks"
2012 Feb 26
1
Sweave Print xtable
Hi, I'm working with Sweave and I have some trouble generating table. The R
code is:
print(xtable(myTable, caption ="", label="tab:myTab",
digits=3), tabular.environment='tabular', floating=TRUE,
caption.placement="top",size="\\scriptsize")
and the resulting LaTeX table is:
\begin{table}[ht]
\begin{center}
\caption{Principal
2012 Nov 05
2
Problem compiling Rnw file
Dear R list,
I'm using R 2.15.2 with TeX Live 2009 and ESS 12.09 . I have a R
project in the '/home/r/Documents/myproj/', which is my working
directory (where I have the .Rnw file). Inside the document I have
several "setwd()" to collect the datasets I use.
After I compile from the terminal using "R CMD Sweave myproj.Rnw", I
receive the error:
Error in
2012 Apr 17
3
Sweave problem after R update version
I would notice this error compiling a Sweave document after I updated R from version 2.14.2 to 2.15.0:
Error in driver$finish(drobj) : the output file 'MyDocument.tex' has disappeared
Calls: <Anonymous> -> do.call -> <Anonymous> -> <Anonymous>
Execution halted
Do you have any suggestion?
Regards
Riccardo
Sent from iPod
[[alternative HTML version deleted]]
2011 Feb 07
2
Error with named chunks in Sweave with the development version of R
Dear all,
There seems to be a problem with named chunks in Sweave with the version
of R under development (downloaded yesterday). When I sweave the file
toto.Rnw described at the end of this mail (Ubuntu 10.04 LTS), the
function Sweave returns an Internal error:
> utils::Sweave("toto.Rnw")
Writing to file toto.tex
Processing code chunks ...
1 : echo term verbatim (label=a)
2
2010 Jan 16
1
Sweave - How to use local objects in code chunks
Hello,
I wrote a function create_report that calls the function Sweave.
create_report shall be used to create a pdf-report about an lm-Object which
is passed as an argument to create_report.
I try to use an object sel_model, that is created within the function
environment of create_report and later on used within the first code chunk
of the file report_template.rnw.
When I use following code I
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}
2012 Nov 07
2
Absolute path in gdata library
Dear list,
I have some .xls files that I need to read into R. I am able to do so
using read.xls in the gdata package, however the helper functions
sheetNames and sheetCount fail. This is the error:
Unable to open file '~/SharedFolder/MyData/mydata.xls'.
Warning: running command ''/usr/bin/perl'
'/usr/local/lib/R/site-library/gdata/perl/sheetCount.pl'
2013 Feb 18
3
odfWeave: Trouble Getting the Package to Work
Hello All,
Have recently started learning Sweave and Knitr. Am now trying to learn odfWeave as well. Things went pretty smoothly with Sweave and Knitr but I'm having some trouble with odfWeave.
My understanding was that odfWeave should work in pretty much the same way as Sweave. With odfWeave, you set up an input .odt file in a folder, run that file through the odfWeave function, and then
2010 Nov 15
1
Sweave: Conditional code chunks?
I have a code junk that produces a figure. In my special case,
however, data does not always exist. In cases where data exists, the
code chunk is of course trival (case #1), however, what do I do for
case # 2 where the data does not exist?
I can obviously prevent the code from being executed by checking the
existence of the object x, but on the Sweave level I have a static
figure chunk. Here an
2011 Sep 26
1
SVM accuracy question
Hi, I'm working with support vector machine for the classification
purpose, and I have a problem about the accuracy of prediction.
I divided my data set in train (1/3 of enteire data set) and test (2/3
of data set) using the "sample" function. Each time I perform the svm
model I obtain different result, according with the result of the
"sample" function. I would like
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 Mar 25
1
Sweave running R chunks for figure generation several times
Hi,
following issue:
Sweave is running the R code to generate
figures three times under standard behaviour,
twice if run with eps=FALSE, once if run
with eps=FALSE,pdf=FALSE.
However, ideally, I'd want it to run once to
generate pds with eps=FALSE being set.
How come this isn't so? Am I missing something?
Basically, my R figure code is expensive to
run. I can of course move the
2010 Oct 25
1
Sweave and absolute escaped backslashed Windows paths in R 2.12.0
I've noticed a change in behavior in R 2.12.0 from 2.11.1 regarding the
treatment of absolute paths in the file argument of Sweave in a Windows
environment.
Consider the minimal Rnw file, attached and reproduced below my
signature in case .Rnw files get stripped. This file is stored on my
(Windows) computer in H:/My Documents. Using an absolute path with the
standard window's
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
2009 May 09
2
Sweave \Sexpr{} advice please
Dear List,
First off, my deepest gratitude to the Sweave developers: this tool has
improved my quality greatly.
A question in my work I use \Sexpr{} statements scalar values and the xtable
package for all manner of tables. What I'd like to do is to use a vector
inline, rather than a whole separate table. Something like:
%%%%%%%%%%%%%%%% begin code
% Latex junk
% Sweave block:
2010 Mar 05
2
Sweave and optional document sections
Dear R and Sweave users,
Is there a way to have optional sections in a Sweave-generated report
document, complete with section header(s), text and code chunks? In other
words, I'd like for my report to include or omit certain sections based on
the data itself.
For example, If I examine the input dataset early on in the report and set a
variable has_daily_data = TRUE, then I'd like to
2007 May 11
1
can't use Sweave in a function?
Hi List,
Please see the following simple example which illustrate the problem. I'm
using R-2.5.0 in WinXP and
R2HTML 1.58.
Thanks,
....Tao
#============="test.rnw" =================
<html>
<body>
<div>
<h1 align=center>Report</h1>
<p>
<<echo=FALSE,results=html>>=
print(y)
print("\n")
print(paste("(",
2003 Jan 29
2
calling sweave function from latex
System info:
Mandrake 9.0
R Version 1.6.1
ESS 5.1.21
Emacs 21.2.1
-------------------
Colleagues
I've been calling R-code embedded in my LaTex document using Sweave, but
would like to make things more convenient. At present as I understand it
you first process the R chunks of code using the Sweave function
called from within R to process a "precursor file" e.g. foo.sw to get a
2003 Jan 29
2
calling sweave function from latex
System info:
Mandrake 9.0
R Version 1.6.1
ESS 5.1.21
Emacs 21.2.1
-------------------
Colleagues
I've been calling R-code embedded in my LaTex document using Sweave, but
would like to make things more convenient. At present as I understand it
you first process the R chunks of code using the Sweave function
called from within R to process a "precursor file" e.g. foo.sw to get 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}