An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20140323/9ac66682/attachment.pl>
How to rescale a raster in R?
3 messages · Manuel Spínola, Edzer Pebesma
require(raster) r = raster() r[] = rnorm(180*360) plot((r-cellStats(r,"min"))/(cellStats(r,"max")-cellStats(r,"min"))) raster::scale, like base::scale, centers to mean zero and scales to unit variance.
On 03/23/2014 06:40 PM, Manuel Sp?nola wrote:
Dear list members, I want to rescale a raster between 0 and 1, how can I do that in R? I know that there is a scale function in the raster package, but I don?t know how to use it for rescaling. Best, Manuel
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Edzer Pebesma Institute for Geoinformatics (ifgi), University of M?nster Heisenbergstra?e 2, 48149 M?nster, Germany. Phone: +49 251 83 33081 http://ifgi.uni-muenster.de GPG key ID 0xAC227795 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: OpenPGP digital signature URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20140323/5e638e4e/attachment.bin>
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20140324/c542ac67/attachment.pl>