Re: [R-sig-Geo] Writing PNG files with rgdal

2009-08-18 Thread Roger Bivand
On Fri, 14 Aug 2009, Barry Rowlingson wrote: I'm wondering if there's an easy way to write PNG files from a matrix? I've got an NxM matrix of values, z, and I want to produce an NxM pixel PNG file. I have a function pfunc(.) that converts values to colours. So currently I do this: library(rt

[R-sig-Geo] Writing PNG files with rgdal

2009-08-14 Thread Barry Rowlingson
I'm wondering if there's an easy way to write PNG files from a matrix? I've got an NxM matrix of values, z, and I want to produce an NxM pixel PNG file. I have a function pfunc(.) that converts values to colours. So currently I do this: library(rtiff) library(rgdal) z = matrix(runif(100),1