[R-sig-Geo] raster package: RGB tif files

Agustin Lobo alobolistas at gmail.com
Tue Oct 20 19:42:28 CEST 2009


I want to use package raster to apply a linear function
to each band of an RGB tif file.

I thought that
 > st <- stackFromFiles("SDIM1246_L1.TIF")

would make a raster stack with the 3 bands, but
 > nlayers(st)
[1] 1

Then I've tried:

a  <- raster("SDIM1246_L1.TIF")

and str(a) indicates that there are 3 bands, but, then, how
can I use calc() on each of them?

Thanks

Agus



-------------- next part --------------
A non-text attachment was scrubbed...
Name: alobolistas.vcf
Type: text/x-vcard
Size: 251 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20091020/98f5fc8c/attachment.vcf>


More information about the R-sig-Geo mailing list