[R] Reading graphics files

Roger Bivand Roger.Bivand at nhh.no
Tue Jun 24 20:44:09 CEST 2003


On Tue, 24 Jun 2003 drf5n at mug.sys.virginia.edu wrote:

> Is there a tool for reading a graphics file into an object?  I might not
> be looking with the correct vocabulary, but I'm finding lots of references
> to producing graphics from R, but not any for inputting graphics into R.
> 
> I'd like to use a jpeg image and have the data available in R for
> analysis.  I could convert the image to another format, PPM perhaps, and
> parse that in, GRASS seems like overkill for a small project, and reading
> an image seems like something that someone else has probably already done.
> 

library(pixmap), perhaps? Reads PNM (so PPM, PGM, PBM).

> Any pointers?
> 
> ?png      # output only
> ?bitmap   # output only
> help.search("ppm") |image|graphics|read|png|bitmap all seem like outputs
> R-data.pdf points the way -- Has anyone imported a graphic file?
> 
> Thanks for your time,
> Dave
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Breiviksveien 40, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 93 93
e-mail: Roger.Bivand at nhh.no




More information about the R-help mailing list