similar to: Sweave: centering with echo=TRUE

Displaying 20 results from an estimated 9000 matches similar to: "Sweave: centering with echo=TRUE"

2009 Jun 14
1
Centering graphics by default in Sweave
Is there an elegant way to get Sweave to center graphics by default? I'd like to use \centerline{\includegraphics{}} etc. to save some vertical space that \begin{center} ... \end{center} uses, and I'd like to avoid centering with each <<fig=T>>= Thanks Frank -- Frank E Harrell Jr Professor and Chair School of Medicine Department of
2007 Jan 11
2
Wishlist: Sweave: allow line breaks after forward slashes (PR#9443)
Full_Name: Arne Henningsen Version: 2.4.0 OS: Linux Submission from: (NULL) (134.245.140.242) Sweave does not allow line breaks after forward slashes ("/"). This might lead to a long "substring" of a command that cannot be wrapped. Hence, Sweave either keeps this long "substring" in the current line and produces a too long line or it moves the entire
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
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]]
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
2007 Jul 09
0
Problem with Sweave and pdf version 1.4
Dear useRs, I'm trying to use ggplot2 in Sweave (R 2.5.1). The plots use the alpha channel, so I need to use pdf version 1.4. Search the mailinglist archive I found two solutions: \SweaveOpts{echo = FALSE, pdf.version=1.4} and explicit writing to a pdf 1.4 file. The latter works but the first doesn't. Probably I'm doing something wrong (see the Rnw file below). The file tmp_tmp.pdf is
2005 Oct 31
2
Sweave (R?) font encoding problems
Dear R list, I'm having some problems with font encodings when using R+Sweave+Latex in my native language: Portuguese. My environment: Kubuntu 5.10 Linux $> uname -a Linux nassa 2.6.12-9-686 #1 Mon Oct 10 13:25:32 BST 2005 i686 GNU/Linux R> R.version _ platform i486-pc-linux-gnu arch i486 os linux-gnu system i486, linux-gnu
2003 Jul 25
0
Sweave and Printing Lattice Figures From Loop
Community, (Windows Xp , 1.7.1, too little memory) This may have the flavor of an answer in search of a question, but I'll pose this question: Is their a better way to do the following than what I'll show below? Problem: In Sweave I have multiple figures from lattice, some of which have more that one page. I can easily figure out the total number of figures I have created, but its
2010 Jan 29
2
RMySQL, Sweave and the annoying TRUE echo
Hi, A small (but annoying) problem with RMySQL library. When a connection is closed, it echoes 'TRUE' to the console. Like this: R> mysqlCloseConnection(con) [1] TRUE The real problem comes when I use RMySQL with Sweave, since the TRUE echo gets into my final Sweave document. Even when I explicitly state <<include=FALSE, echo=FALSE>>= in the header of the R code chunk.
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!
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
2011 Aug 04
4
Sweave - landscape figure
Dear R-users I am trying to understand how Sweave works by running some simple examples. In the example I am working with there is a chunk where the R-commands related to plotting a figure are placed. When running R CMD Sweave ? , pdflatex the output is a portrait figure. I wonder whether it would be possible to change the orientation to landscape (not in the latex file but in Rnw file). Many
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>>=
2009 Dec 08
1
problem with split eating giga-bytes of memory
I'm having trouble using split on a very large data-set with ~1400 levels of the factor to be split. Unfortunately, I can't reproduce it with the simple self-contained example below. As you can see, splitting the artificial dataframe of size ~13MB results in a split dataframe of ~ 144MB, with an increase memory allocation of ~10 fold for the split object. If split scales linearly, then my
2007 Jan 11
0
Wishlist: Sweave: allow line breaks after forward slashes (PR#9445)
On 1/11/2007 9:07 AM, ahenningsen at email.uni-kiel.de wrote: > Full_Name: Arne Henningsen > Version: 2.4.0 > OS: Linux > Submission from: (NULL) (134.245.140.242) > > > Sweave does not allow line breaks after forward slashes ("/"). This might lead > to a long "substring" of a command that cannot be wrapped. Hence, Sweave either > keeps this long
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,
2011 Apr 07
3
Correlation Matrix
Listers, I have a question regarding correlation matrices. It is fairly straight forward to build a correlation matrix of an entire data frame. I simply use the command cor(MyDataFrame). However, what I would like to do is construct a smaller correlation matrix using just three of the variable out of my data set. When I run this: cor(MyDataFrame$variable1,
2010 Mar 11
2
Can't convert list to matrix properly
Hi guys, here is a list of names that I have: MyList: > myList<-list("A", "B","C","D") > myList [[1]] [1] "A" [[2]] [1] "B" [[3]] [1] "C" [[4]] [1] "D" I want to turn this list into a matrix of 1 row and 4 columns with those four components (A, B, C, D) so here is what I do: myDataFrame <-
2003 Jul 29
1
Sweave: pass scale parameter to includegraphics?
Hi all I'm using Sweave and find it a treat. But one question: I use Sweave to create my pictures which are automatically included into LaTeX. For example, in the file test.Snw, I may have: % LaTeX stuff \begin{figure} <<fig=true,width=5,height=5>>= x1 <- seq(1,5, length=10) x2 <- sin(x1) plot(x1,x2) @ \caption{Plot} \end{figure} % More LaTeX This produces the LaTeX
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}