[R] plot from source file

Armin Goralczyk agoralczyk at gmail.com
Thu Oct 4 10:20:52 CEST 2007


Dear list
Maybe someone can help with the following problem:
I have a source file containing the following code for plotting:

pdf(file = 'data/mario/boxplot.pdf')
bwplot(sig100 ~ target | group, data = fish, main = 'Boxplot der
Signale in 100 Zellen nach Gruppe', xlab = '', ylab = 'Anzahl der
Signale')
dev.off()

pdf(file = 'data/mario/xyplot.pdf')
xyplot(sig100 ~ target | group, data = fish, main = 'Signale in 100
Zellen nach Gruppen', xlab = '', ylab = 'Anzahl der Signale',
	panel = function(x,y, ...) {
		panel.grid(h = -1, v = -1)
		panel.xyplot(x,y, jitter.x=TRUE)
		panel.lmline(x,y, lty = 2, col = 3)})
dev.off()

If I run the file from R with
source('lib/analysis_mario.R')
a two pdf-files will be created but they cannot be read.

When I use
source('lib/analysis_mario.R', echo=TRUE)
the files are created correctly.

Actually I don't want the echo, so what can I do to plot correctly and
omit the echo in one run.

I use

platform       powerpc-apple-darwin8.9.1
arch           powerpc
os             darwin8.9.1
system         powerpc, darwin8.9.1
status
major          2
minor          5.1
year           2007
month          06
day            27
svn rev        42083
language       R
version.string R version 2.5.1 (2007-06-27)
-- 
Armin Goralczyk, M.D.
Dept. of General Surgery
University of Göttingen
Göttingen, Germany
http://www.chirurgie-goettingen.de


More information about the R-help mailing list