maptools - Shapefiles in R -


i'm relatively new using shapefiles in r. want create visualizations of country , district level data india i'm using maptools in r. shapefiles, got data gadm.org includes state/district/subdistrict level data india.

however, i'm trying load file in r , it's not happening.this code :

library(maptools)  dist <- readshapepoly("ind_adm2.shp") 

here ind_adm2.shp district level shape file india.

r unable read file, giving me error:

"error in getinfo.shape(filen) : error opening shp file" 

i'm not sure problem is.i have r 3.0.1, have files in appropriate directory something's not right. i'm new making maps in r it's been bit annoying. ideas on how fix this?

you use package rgdal

library(rgdal) library(sp) shp <- readogr("path/to/shpfiles", "ind_adm2") plot(shp) 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -