[R-sig-Geo] shp file with 2 types of bodies (water and forest)

Edzer Pebesma edzer.pebesma at uni-muenster.de
Mon Dec 14 21:47:43 CET 2009


... or subset by [, e.g.

plot(nature[nature$TYPE == "forest", ])

stephen sefick wrote:
> maybe try
>
> ?subset
>
> On Mon, Dec 14, 2009 at 1:41 PM, Baptiste Coulmont <coulmont at ens.fr> wrote:
>   
>> I would like to map the forests in green and the water bodies in blue :
>>
>> summary(nature)
>>
>> Object of class SpatialPolygonsDataFrame
>> Coordinates:
>>         min       max
>> r1  2.560776  6.403847
>> r2 49.493613 51.505419
>> Is projected: FALSE
>> proj4string : [+proj=longlat]
>> Data attributes:
>>                           NAME           TYPE
>>  Dijle                       :   43   forest:6830
>>  Schelde                     :   30   water :6564
>>  Ringselven                  :   17
>>  Albertkanaal                :   15
>>  Westelijke Rijkswaterleiding:   14
>>  (Other)                     :  990
>>  NA's                        :12285
>>
>> How do I ask R to map, for example, only the forests ?
>>
>> --
>> Baptiste   Coulmont
>> http://coulmont.com
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> R-sig-Geo at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>>     
>
>
>
>   

-- 
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster 
Weseler Straße 253, 48151 Münster, Germany. Phone: +49 251 
8333081, Fax: +49 251 8339763  http://ifgi.uni-muenster.de 
http://www.52north.org/geostatistics      e.pebesma at wwu.de



More information about the R-sig-Geo mailing list