[R] print to .jpeg

From: Benjamin Caldwell <btcaldwell_at_berkeley.edu>
Date: Tue, 12 Apr 2011 18:54:17 -0700

Evening folks,

I'm trying to print a series of graphs to .jpeg using a variable as the title, but run into the difficultly that I can't find a way to append the file extension to the .jpeg (in this case extensionless!) files.


biomass = -21.4863 + 0.5797 * (dia ^ 2)
plot (biomass, main=species.name, xlab="dbh in cm", ylab="biomass in kg")

The output is CussoniaHolstii, but I want CussoniaHolstii.jpg. The help file for jpeg() specifies that the name include the extension (e.g. jpeg("CussoniaHolstii.jpg") but then I'd have to input the file name each time.

Any help or workaround much appreciated.
*Ben Caldwell*

        [[alternative HTML version deleted]]

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 13 Apr 2011 - 01:56:59 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 13 Apr 2011 - 04:50:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive