similar to: Sweave: pass scale parameter to includegraphics?

Displaying 20 results from an estimated 7000 matches similar to: "Sweave: pass scale parameter to includegraphics?"

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
2007 Mar 07
1
Sweave issue: quotes in verbatim-like output print incorrectly
Hi all I love Sweave; use it all the time. But I recently received a new computer, and ever since I have had a problem I've never seen before. For example, I place the following in my Snw file: <<>>= sms <- read.table("http://www.sci.usq.edu.au/staff/dunn/Datasets/applications/popular/smsspeed.dat", header=TRUE) attach(sms) sms.lm <- lm( Time ~ Age*Phone,
2004 May 06
1
Printing ps pictures with transparent b'ground
Hi all I wish to create a ps file of a picture produced in R. With my limited R, I see two ways: 1. Print direct to the postscript device 2. Print to the screen, and save to ps using dev.print. I want a white (not transparent) background. Option 1 above works fine, but 2 does not: even when I say I want a white background, I get transparent; perhaps I misread the help files. Here's some R
2003 Mar 19
3
The best way to end up with WMF files
Hi all I am doing some stats work for a group of biologists who require windows metafiles (*.wmf) for their publications. To create these, I appear to have two choices: 1. Restart my machine in Windows and use savePlot 2. Keep my machine in linux, save as another format, then convert. I'd rather stay in linux; but how do I get wmf files? I looked at using ImageMagick's convert,
2004 Jun 22
1
Using xtable with summaries of lm objects
Hi all Suppose I do the following: set.seed(1000) library(xtable) x <- runif( 10 ) y <- 1 + 2*x + rnorm( length(x) ) test.lm <- lm( y ~ x ) summary( test.lm ) xtable ( summary( test.lm ) ) The final xtable output follows: % latex table generated in R 1.8.1 by xtable 1.2-2 package % Tue Jun 22 09:56:36 2004 \begin{table}[ht] \begin{center} \begin{tabular}{rrrrr} \hline &
2002 Dec 16
1
Creating libraries: Cannot make help
Hi all I am trying to package a library in R 1.6.1 (Windoze XP). I have read the document "Writing R extensions" and think I have done things correctly (though apparently not). I have searched the mail archives for help to no avail. I also posted a few days ago and thanks to Peter Dalgaard I have managed to focus my search for errors. I am trying to create a library in R. I run the
2005 Aug 12
1
Help converting a function from S-Plus to R: family$weight
Hi all I am converting an S-Plus function into R. The S-Plus code uses some of the glm families, and family objects. The family objects in S-Plus and R have many different features, for example: In R: > names(Gamma()) [1] "family" "link" "linkfun" "linkinv" "variance" [6] "dev.resids" "aic"
2008 May 18
1
Figure environment and includegraphics options from Sweave
Tha handy thinb about the fig=TRUE option in Sweave is that you do not have to bother about filenames and starting and stpping the device. I want the the resulting LaTeX to look as: \begin{Schunk} \begin{Sinput} > x <- seq(-2 * pi, 2 * pi, 0.1) > plot(x, cos(x), type = "l", lwd = 4) \end{Sinput} \end{Schunk} \begin{figure} \includegraphics[width=0.6\textwidth]{xx-001}
2008 Jun 09
1
Bug/Error in formatC? (Was: Why doesn't formatC( x, digits=2, format= "g")...)
Hi all After posting what follows, Duncan Murdoch suggested perhaps a bug in formatC, or an error on documentation. Any comments? In particular, bug, error or not, any ideas about how I can consistently get two significant figures to print? P. ---------- Original Message ---------- Hi all I am not a C programmer, but I am trying to understand formatC to get consistent printing of
2007 Jun 21
2
Need Help: User Defined R Functions in Sweave/Latex
Dear all, I want to start my post by expressing my sincere gratitude for all the help this group has given me in Sweave/Latex/R. The tools are excellent and so is the community! On to the question. My Sweave code is intended to make lots of plots and create a *.pdf document. Sweave is perfect for this. The only problem is that I find myself using the same R code, within my Sweave input file
2002 Dec 13
1
Loading libraries: Nas introduced
Hi all, I am trying to package a library in R 1.6.1 (Windoze XP). I have read the document "Writing R extensions" and think I have done things correctly (though apparently not). I have searched the mail archives for help to no avail. When I try to attach the library using, eg > library( libname, lib.loc=path.to.library) I get this message: Warning message: NAs introduced by
2005 Oct 06
2
R/S-Plus equivalent to Genstat "predict": predictions over "averages" of covariates
Hi all I'm doing some things with a colleague comparing different sorts of models. My colleague has fitted a number of glms in Genstat (which I have never used), while the glm I have been using is only available for R. He has a spreadsheet of fitted means from each of his models obtained from using the Genstat "predict" function. For example, suppose we fit the model of the type
2002 Nov 19
5
plotting intersecting planes
Hi all In two days, I am giving a small, informal workshop in our Department about using R. Initially, it was just for statistician, but surprisingly (to me anyhow) many mathematicians are also coming who have a MATLAB background. They are coming at the Workshop from a teaching perspective. They are considering using R to avoid licensing issues with MATLAB. One thing they were hoping me to
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}
2003 Apr 02
2
Two questions
Hi all Two questions: 1. I note that help for the postscript device claims "The postscript produced by R is EPS (Encapsulated PostScript) compatible...". It does not say it is EPS *compliant*. Indeed, the EPS produced by R includes a \showpage command which I believe (not that I'm an expert!) non-standard EPS. My question: Is there any reason why it is EPS compatible, but
2010 Jun 10
1
Sweave cutting new lines
Hi, I have trouble with Sweave (I think) cutting of my newlines. As stated in the help of Sweave, I generate tex code straight from R for dynamically computed reports. If I do this in R: for (i in 0:4) {cat("\n",i,"\n")};cat("\n 3") 0 1 2 3 4 3 The output looks correct. However, Sweave for some reason seems to trim everything outside
2011 Mar 08
4
beamer overlays with Sweave?
This may be asking too much, but I'm wondering if anyone has a solution (even a hack) for creating multiple (overlay) plots in an Sweave file and post-processing the overlays in beamer appropriately. For example, suppose I have a series of figure blocks in my .Rnw file: <<plot1,fig=TRUE>>= [stuff] @ <<plot2,fig=TRUE>>= [stuff] @ <<plot3,fig=TRUE>>=
2003 Mar 21
1
The best way to end up with TIFF {Was: end up with WMF)
Hi all I posted a couple of days ago about how to end up with wmf files eventually in R for linux. The short answer was: you (probably) can't...and don't! The journal in question also accepts TIFF files, I am told (it's a physiology journal). So I adjust my question: What is the best way to get TIFF files out of R? It can't create them directly as far as I can tell.
2007 Nov 08
1
Mixing lty specifications in legend
Hi all I have a plot with lines, one specified as (say) lty=1, using standard line types, and another as (say) my own spec: lty="51". I can't get legend to display both. Toy example: > plot(1~1) > legend("topright", lty=c("51",1), legend=c("My own","Standard")) Error in segments(x1, y1, x2, y2, ...) : invalid line type: must be
2004 Mar 29
1
White background in PS pictures
Hi all I am using R to produce postscript pictures via the postscript command. I have never had any problems... until now, when I want to inlcude my .ps file is a LaTeX document *without* a white background. (If it's important, I'm using the prosper class with the whitecross option, so the background in blue.) I would like my .ps file to have a white background. If I read the help