Dear List members
I have a Kenya shapefile with counties.I try to come up with Nakuru county
map and I try with the below code and got an error.How do i  sub-set to
come up with Nakuru shapefile from the Kenya shapefile
here is my code:

> library(maps)

> library(maptools)

> library(sp)

> library(rgdal)

> library(ggplot2)

> counties<-readShapePoly("C://Users/symon/Desktop/gis/counties.shp")

> str(counties)

> Nakuru <- fortify(counties, region = "COUNTY_NAM")
> str(Nakuru)
> unique(counties@data$COUNTY_NAM)

> class(counties)

> counties@data = counties@data[counties@data$COUNTY_NAME != "NAKURU",]

> plot(counties@data)Error in plot.window(...) : need finite 'xlim' valuesIn addition: Warning messages:1: In min(x) : no non-missing arguments to min; returning Inf2: In max(x) : no non-missing arguments to max; returning -Inf3: In min(x) : no non-missing arguments to min; returning Inf4: In max(x) : no non-missing arguments to max; returning -Inf

	[[alternative HTML version deleted]]

