Displaying 2 results from an estimated 2 matches for "readmagicnumber".
2003 Nov 21
1
How to read .bmp files into R? read.pnm throws error
Hi,
Is there a way to read .bmp files into R? I have tried read.pnm from pixmap
package. It returned
Error in pm.readmagicnumber(con) : Not a PNM format file
Anyother ways to load bitmap images?
Yi-Xiong
2009 Apr 09
1
reading an image and adding a legend
...ne
x <- read.pnm(system.file("pictures/logo.ppm", package="pixmap")[1])
plot(x)
#draws an R logo, nice :-)
But my code returns an error
x<-read.pnm("C:/Documents and Settings/simonp/My Documents/Simon BTO/RELU/GIS data/ten km areas in analysis.bmp")
Error in pm.readmagicnumber(con) : Not a PNM format file
I have tried changing the dpi when I export the image but still no cigar.
I have dredged the help forum for related files and read the help files. My Os is windows XP and i'm running 2.8.1.
I feel I'm missing something obvious!
Thanks
Dr. Simon Pickett
Rese...