if object states is of class "SpatialPolygons" or of class "SpatialPolygonsDataFrame", use
plot(states[1,]) you can find out by asking class(states) On 11/01/2010 07:42 PM, Peter Larson wrote: > Hello all, > > This is probably a completely stupid question, but how does one subset > a polygon data set for display? > > I have a file of states of a country and just want to display one of them. > > Pete > > _______________________________________________ > R-sig-Geo mailing list > R-sig-Geo@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.pebe...@wwu.de _______________________________________________ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo