Re: [R] [newbie] separating plot output from debug output

2012-02-15 Thread Tom Roche
Tom Roche Wed, 15 Feb 2012 17:43:05 -0500 >> 1 I'm plotting to PDF, so everytime I dev.off() creates a new file, >> and I want everything in one file (as does my boss :-) >> 2 I'm doing the work on a cluster, where I very much do not have >> root, and which has a fairly minimal set of install

Re: [R] [newbie] separating plot output from debug output

2012-02-15 Thread ilai
If you don't dev.off(), all plots will be sent to the open graphical device. That usually doesn't impact behavior of other output types: pdf(file='fooout.pdf') hist(x <- rnorm(100)) y <- sin(x) print(str(y)) cat(y,file='fooout.txt') plot(x,y) dev.off() Hope this helps On Wed, Feb 15, 2012 at 3:4

[R] [newbie] separating plot output from debug output

2012-02-15 Thread Tom Roche
I'm attempting to refactor an R script that does a lot of plotting, among other things. Ideally I'd like to do something like setup # does pdf(...) for each part of input { plot(process(part)) } cleanup # does dev.off() but have problems: 1 I'm plotting to PDF, so everytime I dev.off()