[R] Issues getting R to write image files

Kenny Larsen k.larsen at sheffield.ac.uk
Thu Jun 11 11:08:44 CEST 2009


Hi All, 

Have spent the last couple of days learning R and shell scripting to do
batch plotting jobs. I have had success getting R to complete a filled
contour plot and output to a file (.jpg or .tiff etc). However, when I try
to do the same thing with the simple plot command the script seems to
execute correctly yet there is no output. Below is my R code: 

file <- Sys.getenv("input_file") 
tiff(paste( file, "tiff", sep=".")) 
z <- read.table(file) 
plot(z, type="l", xlim=range(0.6,2), col = "red", plot.title = title(main =
file, xlab = "Wavelength (um)", ylab = "Intensity (arb.)) 
q() 

The data file is simply 2 columns of real numbers. The system it is running
on is a linux box from the command line, but does have the Xlibrarys and can
clearly write tiff's as it managed it with the filled contours. 

Bear in mind I only started with both linux and R a couple of days ago, so
be gentle if it is something silly! 

Cheers, 

Kenny

-- 
View this message in context: http://www.nabble.com/Issues-getting-R-to-write-image-files-tp23977785p23977785.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list