Displaying 20 results from an estimated 20000 matches similar to: "Sweave question"
2003 Sep 10
1
sweave problem
hi!
using:
Version 1.8.0 Under development (unstable) (2003-09-02)
using the Sweave function of the tools package i get this error when
latexing with texi2dvi --pdf
! LaTeX Error: File `upquote.sty' not found.
if i change the line
\usepackage{/users/faculty/ririzarr/R-1.8.0/lib/R/share/texmf/Sweave}
to
\usepackage{/users/faculty/ririzarr/R-1.7.1/lib/R/share/texmf/Sweave}
in the tex file,
2003 Dec 25
0
Re: if .. else parse error {was "Sweave question"} (fwd)
Dear All,
Thanks to all that took the time to respond to my questions (included
at the bottom). Martin Maechler was nice enough to give me a detailed
explanation which he suggested i forward.
The confusion arose because
if(exists("x")) plot(x,x)
else{ plot(1,1,type="n");text(1,1,"data not available.\n")}
gave me an error when used as a chunk in a Sweave
2007 Dec 01
2
Sweave: Variables in code chunk headers
I would like to be able to do something like this:
<<echo=F,fig=T,width=mywidth>>=
...
@
with mywidth set in a previous code chunk. Is there a way to do this in
Sweave?
(Sorry for two questions in a row, I have been saving these up.)
--
Michael
2007 Dec 01
2
Sweave: Variables in code chunk headers
I would like to be able to do something like this:
<<echo=F,fig=T,width=mywidth>>=
...
@
with mywidth set in a previous code chunk. Is there a way to do this in
Sweave?
(Sorry for two questions in a row, I have been saving these up.)
--
Michael
2010 Jul 26
2
Trouble using grid.layout in Sweave
Hi!
I am troubled by Sweave which I want to use in order to plot graphics which
I build up successively by the use of grid.layout. Here is the code:
<<fig=TRUE,label=evolDist,height=6in,width=3in,pdf=FALSE>>=
## combined plot via grid viewports
grid.newpage()
pushViewport(viewport(layout=grid.layout(2,1)))
vlay <- function(x,y) viewport(layout.pos.row=x, layout.pos.col=y)
2010 Apr 12
1
Sweave and multiple figures from an R source file
Hi,
I am trying to get figures from multiple source files in Sweave. My test
file is as follows
\documentclass{article}
\usepackage{Sweave}
\begin{document}
\begin{section}{notitle}
This is a simple Sweave test
<<gethypergraphs_rhea,fig=TRUE,echo=F>>=
source("./testfig.r")
@
\\
End of the simple sweave test
\end{section}
\end{document}
where testfig.r is as simple as
2008 Feb 27
2
Adding LaTeX cross-references into Sweave plots
Hi all
I'm using Sweave and LaTeX, and love how they interact.
But here's a different interaction I'm not sure how to achieve; I
hope someone can help. I use a simple example, of course, to
demonstrate.
Suppose in my LaTeX document I have this:
Here is a linear equation:
\begin{equation}
y = -1 + 3 x
\label{EQ:example}
\end{equation}
This appears in the final product
2010 Nov 19
3
Sweave Dynamic Graph Question
i have a time Series of IBM closing px from 1/1/2000 to today
I want to graph the time serie by dividing the graph by year and month
all the monthly graphs with the same year will go to one page. so from
1/1/2000 to 11/19/2010. i will have
11 pages, and each page will have 12 graphs (jan to dec) except for 2010.
I am able to do it in R, but when i use sweave, I can only print the last
page.
2011 Mar 27
1
Sweave: include a multi-page-pdf plot
Hi,
I'm just starting out with Sweave, and I can't get a plot(linmod) to
display all four plots:
<< bild >>=
x1 <- runif(100)
x2 <- rexp(100)
y <- 3 + 4*x1 + 5*x2 + rnorm(100)
mod <- lm(y~x1+x2)
plot(mod)
@
Some Text
<<fig=TRUE>>=
<<bild>>
@
This plots only the first image of the four-page plot.lm() result.
I don't want to use
2002 Oct 30
4
Sweave in packages
Dear R folks,
One of the fantastic new tools in R is `Sweave'. I have tested it so much that I
know it works and produces fine documentation, and with (GNU) Emacs/ESS it is
nice to work with, too. I started to have a look at including some Swoven (is
that a strong verb?) documentation with my R package, but it seems that there is
no model to copy among those packages that I have installed in
2008 Nov 03
1
Sweave: side by side dynamic graphs
Hi all:
I'm trying to create some side by side dynamic graphics on the same page but I am running into some problems. I am able to create side by side figures only if I import them into my PDF. see the example bellow:
\documentclass[12pt]{article}
\usepackage{color,cite,graphicx}% to put in axodraw
\usepackage{latexsym,amssymb,epsf}
\begin{document}
%Import two figures side by side. Please
2007 Aug 31
2
Bugreport on integration of Sweave and latex beamer
I think I have isolated a problem with integration between Sweave and beamer.
Could you please see the file:
http://www.mayin.org/ajayshah/tmp/bugdemo.Rnw
Unfortunately, it uses some of my internal libraries, so you can't run
it. When I put it through Sweave, I get:
http://www.mayin.org/ajayshah/tmp/bugdemo.tex
which is, of course, a generic latex file which you can read and
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!
2010 Aug 10
1
Sweave with dev.new()
Dear list.
I am preparing a R package, and the last step is to write a package
vignette using Sweave. However, I am experiencing some trouble when trying
to include plots in my Sweave document. That is, in my package I have made
some plotting functions in which I start by calling 'new.dev()' to start a
graphics device of a certain width and height, and then proceed with
plot(). These
2007 Jun 19
1
: create a PDF file (text (print list) and grafics)
Dear helpers,
I need help to create a PDF file like the example
-----------------------------------
| Title |
-----------------------------------
| |
| Text (print a list) |
| |
-----------------------------------
| | |
| | |
| image | image |
| | |
| | |
-----------------------------------
2012 Feb 20
2
Computing plot size in Sweave
Sometimes you want to compute the physical size of a plot based on data.
In R itself this is no problem.
But is there a way to compute the values of height and width in S-weave, say:
<<graph,fig=TRUE,height=xx,width=yy>>=
where xx and yy are computed and not physically written in the document?
Bendix
______________________________________________
Bendix Carstensen
Senior
2005 Nov 17
3
changing figure size in Sweave
Hi
In Sweave, how does one change the size of the plots?
I tried using a hook:
<<echo=FALSE, print=FALSE, fig=TRUE>>=
options(SweaveHooks=list(fig=function() ps.options(width=1)))
library(graphics)
pairs(iris)
@
but this didn't change the size of the figure. How to make the
figures a
different size?
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre,
2004 Jul 02
2
hclust
im using plclust and want the labels to be different colors.
i took a look at getS3method("plot","hclust")
and saw a call to .Internal. i looked at the help on .Internal and dont
know where to go next. any help appreciated!
thanks,
rafael
2005 Apr 07
4
sweave bwplot error
Hi
I use sweave and have a problem with the following figure, but not with
other figures:
tt <- data.frame(c("a", "b", "c"), c(1.2, 3, 4.5))
names(tt) <- c("x1", "x2")
bwplot(x2 ~x1, data = tt)
ok now in sweave:
\begin{figure}[H]
\begin{center}
<<echo=FALSE, fig=TRUE, height=5, width=10>>=
lset(col.whitebg())
bwplot(x2 ~x1,
2003 Apr 08
1
sweave quesiton
if i write a funciton like this
f <- function(x) Sweave("report.Rnw")
and report.Rnw has an R chunk like this:
<<>>=
print(x)
@
i get an error: 'Object "x" not found'.
is there a way to avoid this
without using assign to create a global variable?
thanks,
rafael