[R] Plot map by region using kasc and adehabitat

Alex Olssen alex.olssen at gmail.com
Fri Sep 23 05:23:34 CEST 2011


Hi there,

I thought it would be useful to answer my own question for anybody
else searching Google.

An easy way to split a national map into smaller maps at lower levels
of aggregation is to use the function
mask()
in the package
raster

Alex

On 21 September 2011 19:20, Paul Hiemstra <paul.hiemstra at knmi.nl> wrote:
>  On 09/21/2011 01:39 AM, Alex Olssen wrote:
>> Dear R-help,
>>
>> I have a raster map which has a measure of profitability of land by
>> parcel over several regions of geographic aggregation (think of
>> counties).  This data is stored in an ASCII file.  If I type
>>
>> plot(profit)
>>
>> I get a raster map of profit per parcel for all regions.  I want to
>> plot separate maps for each county.  I used kasc to combine the profit
>> map with a county map from a separate ASCII file.
>>
>> data.kasc <- as.kasc(list(profit, county))
>>
>> Can anyone help me plot profit maps for each county separately?
>>
>> Kind regards,
>> Alex
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>
> ...to make us more willing to answer the question:
>
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and *provide commented, minimal, self-contained, reproducible code.*
>
> Paul
>
> --
> Paul Hiemstra, Ph.D.
> Global Climate Division
> Royal Netherlands Meteorological Institute (KNMI)
> Wilhelminalaan 10 | 3732 GK | De Bilt | Kamer B 3.39
> P.O. Box 201 | 3730 AE | De Bilt
> tel: +31 30 2206 494
>
> http://intamap.geo.uu.nl/~paul
> http://nl.linkedin.com/pub/paul-hiemstra/20/30b/770
>
>



More information about the R-help mailing list