similar to: Sweave and multiple figures from an R source file

Displaying 20 results from an estimated 1000 matches similar to: "Sweave and multiple figures from an R source file"

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
2008 Jul 06
2
Issue with postscript figures using WinAnsi encoding
Hi there, I've hit a bump in writing postscript files with special characters in the WinAnsi encoding on a windows machine. Here's some sample code: ########################################### postscript(file = "test.eps", encoding="WinAnsi.enc", width = 3, height = 5.5, onefile = TRUE, horizontal=FALSE, family = "sans", title =
2005 Apr 07
2
newline in lattice axis label
Hi, I have a 3 panel xyplot with different variables in the y axis. I'm trying to insert a newline after "Width (cm)," in the ylab argument as in the example below. My goal is to have the y axis label broken into two lines, split after the string just mentioned. plotfun <- function() { fakedf <- data.frame(A = sample(1:100, 50), B = rnorm(50),
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
2002 Jan 27
5
EPS->LaTeX problem
Greetings- I have a strange problem displaying a graph from R (1.3.1, linux) in a LaTeX document of documentclass seminar. I'm using graphicx to include the file: \usepackage{graphicx} ... \resizebox{\textwidth}{\textheight}{\includegraphics{crime.eps}} When I do this, the entire slide (including the page number) is rotated 180 degrees. Any ideas why this happens? The graph was created
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!
2008 Sep 06
2
Sweave and/or beamer issue
Dear Friends, I not sure whether this is an Sweave or a beamer problem. The Rnw file: \documentclass[compress,smaller]{beamer} %\documentclass{article} %\usepackage{beamerarticle} \usepackage{Sweave} \title{Psychophysics II} \date{September 9, 2008} \begin{document} \frame{ \begin{Schunk} \begin{Sinput} > ro <- 0.2 > c <- seq(from = -3, to = 4, by = 0.1) > fn <- 1 -
2009 Apr 09
1
pdftex treats R pdf figures incorrectly
Hello! I use R 2.8.1 under Debian GNU/Linux. I've run into a problem including R pdf figures into LaTeX document. To reproduce: 1) Execute the following minimal R script: pdf('fig.pdf', family = 'URWTimes', width = 5, height = 5) plot(rnorm(10), main = '????', xlab = '????????', ylab = '????????') dev.off() embedFonts('fig.pdf') 2) Open
2009 Jan 05
2
Sweave data-figure coupling
Hi, With the following Sweave minimal file: ---<--------------------cut here---------------start------------------->--- \documentclass{article} \usepackage{Sweave} \begin{document} <<binom-sim>>= thetas <- seq(0, 1, by=0.001) prior <- rep(1, length(thetas)) / length(thetas) lik <- dbinom(1, 1, thetas) lik.p <- prior * lik post <- lik.p / sum(lik.p)
2004 Mar 11
1
Difficulties in interaction between R and latex (prosper)
Hello, folks! I'm trying to use R as a graphics program, to make some pretty graphs that will go into prosper slideshows. I wrote this fragment, from the R manual, into a file demo.R: x=seq(-3,3,0.1) postscript("cm_test.eps", width = 4.0, height = 3.0, horizontal = FALSE, onefile = FALSE, paper = "special", family =
2002 Dec 20
5
Getting graphs into LaTeX
Hello ALL: I ran with success the following commands in R getting a file saved ------------------------------------------------------------------------------------ postscript() postscript('~/data/st202/2003/lecture00/lecture00-graph-01.eps', horizontal = FALSE, height = 6, pointsize = 10) hist(trial.outcome.5, breaks = 5, main = '1000 Replications of 5 Trials of a
2010 Feb 11
1
Sweave, lty = 3 line incorect in pdf output
I'm having a problem with dotted lines (lty = 3) in the pdf output in documents generated with Sweave. In the displayed pdf, the dotted line does not show up and in the printed output, it is there but does not seem to respect the lwd argument, for example, it is very faint despite using lwd = 3. The dotted line is correct in a quartz window and if I save the Quartz window to a pdf and
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
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 Mar 07
3
R-Logo in \LaTeX (Mag. Ferri Leberl)
Dear Mag. Ferri Leberl, I'm using something like: ----------------------- tex.tex --------------------------- \documentclass{article} \usepackage{graphicx} \usepackage{fancyvrb} \newcommand{\Rlogo}{\protect\includegraphics[height=1.8ex,keepaspectratio]{Rlogo.pdf}} \newcommand{\myinput}[1] {\begin{scriptsize} \VerbatimInput[frame=single,label=#1]{#1} \end{scriptsize}} \title{The R logo,
2008 Mar 07
3
R-Logo in \LaTeX (Mag. Ferri Leberl)
Dear Mag. Ferri Leberl, I'm using something like: ----------------------- tex.tex --------------------------- \documentclass{article} \usepackage{graphicx} \usepackage{fancyvrb} \newcommand{\Rlogo}{\protect\includegraphics[height=1.8ex,keepaspectratio]{Rlogo.pdf}} \newcommand{\myinput}[1] {\begin{scriptsize} \VerbatimInput[frame=single,label=#1]{#1} \end{scriptsize}} \title{The R logo,
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
2005 Jan 14
2
Questions on Inserting R graphs in latex!
Hi, I try to insert R graphs into a latex file and I am using a Texniccenter/MikTex combination in my Windows XP. Here are the errors I got. Could someone give me some clues? In R, I did > plot(sin(1:10), pch="+") > dev.print(device=postscript, "C:\\myFigure.eps",onefile=FALSE, horizontal=FALSE, paper="special") In latex, I did (myFigure.eps is in the same
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}