Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.LNX.4.44.0306242043060.19201-100000@reclus.nhh.no>
Date: 2003-06-24T18:44:09Z
From: Roger Bivand
Subject: Reading graphics files
In-Reply-To: <Pine.LNX.4.44.0306241356340.490-100000@mug.sys.virginia.edu>

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