r - rgdal::readOGR versus readOGR namespace issue? -


i trying load shapefile using the rgdal package. why command fails:

plot(rgdal::readogr(dsn=system.file("vectors/up.tab", package = "rgdal")[1],layer="up")) 

with error:

error in as.double(y) : cannot coerce type 's4' vector of type 'double'

while 1 suceeds

library(rgdal) plot(readogr(dsn=system.file("vectors/up.tab", package = "rgdal")[1],layer="up")) 

my guess is has hidden plot method spatialgdal. how uncover going on behind scenes plot ?

i trying call readogr after "importing" rgdal within package writing. in effort avoid namespace conflicts using importfrom rgdal readogr.


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -