[R] maptools readShapeSpatial not working in R 3.3.0

MacQueen, Don macqueen1 at llnl.gov
Thu Jun 16 22:06:38 CEST 2016


You might want to ask about this on R-sig-geo.

I use readOGR() from the rgdal package to read shapefiles, and it is
currently working for me in R 3.3.0.

-Don

-- 
Don MacQueen

Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062





On 6/16/16, 12:34 PM, "R-help on behalf of Bravo, Mercedes"
<r-help-bounces at r-project.org on behalf of mbravo at med.umich.edu> wrote:

>Hello,
>I have some R code that uses readShapeSpatial in the maptools package to
>read a shapefile from ArcGIS.   This code worked as recently as May 2016,
>when I was using R version 3.2.3.  Then, R was updated to version 3.3.0.
>Now, when I run the same code that worked three weeks ago, I get an error:
>
>> path      <- "W:/..../CAP_2011_blocks_repair.shp"
>> shape     <- readShapeSpatial(path, IDvar="GEOID10")
>Error in if (nchar(projargs) == 0) projargs <- as.character(NA) :
>  missing value where TRUE/FALSE needed
>
>Note that if I run the code above using the older version of R (3.2.3),
>it does not give me an error, and instead provides me with an
>"SpatialPolygonsDataFrame" object.
>
>However, it is not easy for me to switch back and forth between versions
>of R because I work on a protected computer that does not have an
>internet connection or an easy mechanism for file transfer.
>
>I am using the SpatialPolygons object as an input for subsequent
>analysis, so I need something of this type.
>
>Your help would be greatly appreciated.
>
>
>Regards,
>Mercedes
>**********************************************************
>Electronic Mail is not secure, may not be read every day, and should not
>be used for urgent or sensitive issues
>
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list