Displaying 20 results from an estimated 1000 matches similar to: "Centering graphics by default in Sweave"
2002 Nov 13
1
Package documentation and rd.sty
Hi all,
I've got a basic question regarding package documentation and rd.sty. I
wrote my first own package, and now I would like to place the documentation
into the appendix of another LaTex document. Seemingly I cannot simply
\usepackage{Rd}, as this will modify the page-settings of my document. Is
there a minimum style file which will just define the environments and
commands needed for
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
2008 Jul 27
2
Colors in Sweave
Hi list,
I was using Sweave and was wondering if anyone has had any luck changing the font colors of the code chunks. For instance, in my .Rnw preample I tried including:
===
\usepackage[usenames]{colors}
\definecolor{darkred}{rgb}{0.545,0,0}
\definecolor{midnightblue}{rgb}{0.098,0.098,0.439}
\DefineVerbatimEnvironment{Sinput}{Verbatim}{fontshape=sl,formatcom={\color{midnightblue}}}
2009 Apr 19
2
Sweave: Changing the background color, adding a border
Hi all,
I am using Sweave to produce a document. Unfortunately, I have to print
several copies and I can't print them in color. So I would like to
change the way of printing the code. I would like to print the code in a
box with a black borderline and a grey background (quite classic). Is it
possible to do it by changing some Schunk options?
Christophe
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
2010 Apr 26
1
Sweave: centering with echo=TRUE
In a .Rnw file I want to insert the R command
pairs(mydataframe)
and achieve the following effects
1. the command itseld is echoed into the tex document generated by Sweave
<<fig=TRUE,echo=TRUE>>=
2. The graphics generated appears in the tex document, with the graphics
centred.
3. The R command > pairs(mydataframe) is not centered.
Sweave-manual.pdf gives the following code chunk
2002 Nov 08
1
pdf() and pdflatex
I am having good success in using pdf() to produce pdf graphics files for inclusion in documents processed by pdflatex [I'm using R 1.6.0 on Linux]. I am having one small problem consistently though, which I believe I also had with S-Plus's pdf.graph(): wasted space at the top of the graph which causes pdflatex to put the graph on a later page, when the current page has plenty of space.
2012 Apr 01
3
How to use Latex code in R loop?
Hi,
I am newbie in Latex and R. I am working on one report in which i need to
read file and display content of file by formatting (adding color boxes and
colorful text for each record). For this i need to use latex code in R loop.
How can i use Latex code in R loop. Any example will help me a lot.
Thanks
--
View this message in context:
2009 Mar 17
1
Combining Sweave and fancyvrb
I find Sweave very useful and I was trying to combine it with the
latex package fancyvrb. I was trying to get line numbering and labels
in order to reference the lines where particular commands occur.
Unfortunately, I haven't been able to figure out how to do it. Maybe
somebody can help me.
The following is a sample Rnw file: the first part shows what I would
like to get, the second what I
2010 Feb 24
4
R Graphics into Latex
Hi,
I'm new in Latex and I'm trying to include an R chart into a Latex document.
This is what I'm doing:
1) In R: save the chart as a a Postcript in a folder C:/xxx/Density.eps
2) In Latex (using TexWorks on windows xp) :
In the preambule:
\documentclass[11pt]{article}
\usepackage{graphicx}
\begin{document}
blah..blah…blah
\begin{figure}
\centering
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 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
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}
2010 Mar 29
3
Page width figures in Latex
bRotheRs & sisteRs,
I am once again attempting to learn enough Latex voodoo to get something
done, and failing comically. The document "RJAuthorguide.pdf"
mentions that one can get page width figures through the use of the
"figure*" or "table* environments, but despite considerable searching
through the mail archives and reading Frank Harrell's discussion of
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
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!
2003 Jul 23
4
.ps files in R
I have recently "printed" in R to a postscript file. I'm working on a SSH
without an X terminal. It was fairly automatic:
> plot(x,y)
> dev.off()
And then the default creates a file called Rplots.ps which I can ftp to my
laptop and open in Ghostscript. I can see the file, and nothing looks odd.
However, when I import it into LaTeX, it refuses to configure right side up.
2009 Nov 01
2
Internal error in 'ls' for pathological environments (PR#14035)
nchar(with(list(2),ls())) gives an internal error. This is of course
a peculiar call (no names in the list), but the error is not caught
cleanly.
It is not clear from the documentation whether with(list(2)...) is
allowable; if it is not, it should presumably give an error. If it is, then
ls
shouldn't have problems with the resulting environment.
> qq <- with(list(2),ls())
2010 May 11
1
Table and Sweave
Hi,
in Latex I get the table using:
\begin{table}[H]
\centering
\renewcommand{\arraystretch}{1.3}
\setlength{\tabcolsep}{18pt}
\begin{tabular}{cc} \hline
Idade & Frequ?ncia \\ \hline
$18 \vdash 26$ & 11 \\
$26 \vdash 34$ & 8 \\
$34 \vdash 42$ & 26 \\
$42 \vdash 50$ & 20 \\
$50 \vdash 58$ & 23 \\
$58 \vdash 66$ & 30 \\
$66
2005 Sep 04
1
A memory management question
Can someone explain the use of SETLENGTH() and SETTRUELENGTH()?
I would like to allocate a vector and reserve some space at the end,
so that it appears shorter than the allocated size. So that I can
more efficiently append to the vector, without requiring a new copy
every time. So I'd like to use SETLENGTH() with a shorter apparent
length, and bump this up as needed until I've used the