similar to: plot width in Sweave

Displaying 20 results from an estimated 3000 matches similar to: "plot width in Sweave"

2005 Sep 16
1
setkeys and Sweave
Hi there: Using \setkeys{Gin}{width=1.0\textwidth} \setkeys{Gin}{height=10cm} \setkeys{Gin}{height=0.8\textwidth} all seem to work under R-2.1.1 under sparc, solaris2.9, but \setkeys{Gin}{scale=0.3} \setkeys{Gin}{angle=90} do not work. I have not been able to find relevant information, googling on setkeys proved confusing, at best. http://cnlart.web.cern.ch/cnlart/218/node85.html states:
2010 Aug 17
3
Sweave
Dear R users, I am using Sweave. I would like to use the width option for the graphics : \begin{figure}[h!] \centering \includegraphics[width=0.7\textwidth]{x} \end{figure} How do I get this ? Thank you very much, Randall [[alternative HTML version deleted]]
2009 Jun 25
1
Setting default plot size in Sweave
Dear Colleagues: I have used \SweaveOpts{prefix.string=plot, eps = FALSE, pdf = TRUE} \SweaveOpts{width=5, height=4} <<fig=T>>= plot(...) @ But the figure still has a width of 80% of the text width, the default set up by Sweave, which issues a LateX command in Sweave.sty of \setkeys{Gin}{.8\textwidth}. Sweave.sty has a command \ifthenelse{\boolean{Sweave at
2006 Dec 12
1
Sweave, Xfig, pdflatex and \setkeys
Dear useRs, How does one include graphics created with Xfig with LaTeX fonts into Sweave? If I create a graphic with Xfig with some Computer Modern fonts, I choose to export it as combined PDF and LaTeX. So I get two files, one foo.pdf with the drawings without the text and foo.pdftex with some LaTeX code that ensures the text lands in the right place together with the drawing. I'm supposed
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,
2012 Apr 04
3
Rgui maintains open file handles after Sweave error
Hello Folks, When I run the document below through sweave, rgui.exe/rsession.exe leaves a file handle open to the sweave-001.pdf graphic (as verified by process explorer). Pdflatex.exe then crashes (with a Permission Denied error) because the graphic file is locked. This only seems to happen when there is an error in the sweave document. When there are no errors, no file handles are left open.
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 Nov 04
3
getting "small" graphs with Sweave using Rnews.sty
I'm sorry for having to post this, but I can't seem to find any solutions to this, which seems pretty simple, but then again... I've started playing with the example r news project and wanted to start adding some graphs, but replacing: \begin{figure} \vspace*{.1in} \framebox[\textwidth]{\hfill \raisebox{-.45in}{\rule{0in}{1in}} A graph goes here \hfill}
2005 Jan 06
2
autoscaling plot font size in Sweave output possible?
Hi, I was wondering if it's possible to have fonts in plots to be autoscaled to the same font size used by LaTeX in a surrounding Sweave document. Here's a short example in which the fonts of the first plot are barely readable: --8<------------------------schnipp------------------------->8--- \documentclass{article} \usepackage{graphicx} \newcommand{\mytext}{Some normal sized
2009 Aug 22
1
improving ?RweaveLatex
Dear developers Please read below. On 6/25/09, Marc Schwartz <marc_schwartz at me.com> wrote: > You can use the following *after* the \begin{document} directive: > \setkeys{Gin}{width=0.8\textwidth} > > The above is the default. Reset it to what you would like. > > Note, as per that manual page, that the Sweave options 'height' and 'width' > affect
2008 Nov 22
1
declaring constants in an Sweave / LaTeX document
List, I would like to set a variable to hold, say, the size of my plots in a Sweave document. i.e. something like the following in my '.Rnw' file: ============================================================================== smallPlotSize = 4 <<fig1, echo=false, results=hide, height=smallPlotSize, width=smallPlotSize, fig=true>>= dat <- read.table("
2011 Aug 17
0
Sweave and graphics
Dear R-Users I think I am getting the hang of how sweave works. However there is one thing I am struggling with - nice small size graphics. Here is the piece of the Rnw file that creates the figures. <<pl1,fig=TRUE,include=FALSE,echo=false>>= #pdf(file="datapl1.pdf",paper="a4",width=0,height=0); plot(yt,ypred,xlab="Data",ylab="Predicted
2009 Feb 12
3
getting all pairwise combinations of elements in a character string
I'm able to do this as follows, but am wondering if anyone knows a simpler way which still avoids explicit loops? > (mystring <- letters[1:5]) [1] "a" "b" "c" "d" "e" > unlist(sapply(mystring[-length(mystring)], + function(x) paste(x,mystring[(grep(x,mystring)+1):length(mystring)],sep=""))) a1 a2 a3
2011 Jan 05
1
Comparing fitting models
Dear all, I have 3 models (from simple to complex) and I want to compare them in order to see if they fit equally well or not. From the R prompt I am not able to see where I can get this information. Let´s do an example: fit1<- lm(response ~ stimulus + condition + stimulus:condition, data=scrd) #EQUIVALE A lm(response ~ stimulus*condition, data=scrd) fit2<- lm(response ~ stimulus +
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
2004 Aug 21
3
sweave and post "rpart"
Hi, have anybody positive experience how it is possible get the post output from a rpart-object in a large sweave file or is only the less nicely plot function instead of post possible??? \begin{figure}[htbp] \begin{center} <<fig=true,eps=T>>= post(dtreeEB, title="Tree",digits=getOption("digits") - 0,use.n=TRUE) @ \caption{Tree1} \end{center}
2009 Jan 22
2
"latex" in Hmisc: cell formating
Hi list, Could you explain the error I see here? Thanks! ## I'm using R 2.8.0 on WinXP, Hmisc_3.4-3 > table1 <- matrix(10, 180,7) > cell.format <- matrix("", ncol=7, nrow=180) > cell.format[c(seq(3,180,6),seq(4,180,6)),] <- "color{red}" > cell.format[c(seq(5,180,6),seq(6,180,6)),] <- "color{green}" > > latex(table1,
2011 Jan 05
2
Problem with 2-ways ANOVA interactions
Dear All, I have a problem in understanding how the interactions of 2 ways ANOVA work, because I get conflicting results from a t-test and an anova. For most of you my problem is very simple I am sure. I need an help with an example, looking at one table I am analyzing. The table is in attachment and can be imported in R by means of this command: scrd<-
2013 Feb 25
1
creating variable that codes for the match/mismatch between two other variables
Dear all, I have got two vectors coding for a stimulus presented in the current trial (mydat$Stimulus) and a prediction in the same trial (mydat$Prediciton), respectively. By applying an if-conditional I want to create a new vector that indicates if there is a match between both vectors in the same trial. That is, if the prediction equals the stimulus. When I pick out some trials randomly, I get
2009 Jul 13
3
SweaveListingUtils question
Hello, recently I read about the SweaveListingUtils package and now I want to try it out. However, I can not make it work... Below a minimal example. The problem seems to be the following line (generated by SweaveListingPreparations()?): \ifthenelse{\boolean{Sweave@gin}}{\setkeys{Gin}{width=0.6\textwidth}}{}% If I comment out this line, it works. What can I do about this? I am using the