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
Post a Comment