[R-sig-Geo] routine write.pointShape missing from maptools under R 2.10?

Roger Bivand Roger.Bivand at nhh.no
Thu Dec 24 10:47:40 CET 2009


On Wed, 23 Dec 2009, reeves at nceas.ucsb.edu wrote:

> Hello List:
>
> While testing some R scripts that use maptools/write.pointShape(), and which
> run correctly under R ver 2.9 (and earlier), I encountered:
>
> package 'maptools' successfully unpacked and MD5 sums checked
>
> The downloaded packages are in
>        C:\Users\visitor.rover19\AppData\Local\Temp\RtmpLg4gih\downloaded_packages
>
> Executing the line:
> #
> # rgdal loads sp
> #
>     require(rgdal)
>     require(PBSmapping)
>     require(maptools)
> .....
>
> gives:
>     write.pointShape(coordinates=coordinates(cbind(PolyCentPBS[,2],PolyCentPBS[,3])),PolyCentPBS,FullName)

As of the latest release, maptools functions that have been deprecated 
(warned off) for some time - those not using sp S4 classes - have been 
removed from the namespace. All package maintainers depending on these 
were notified in advance. If you really need them, you get them in the 
usual way for internal functions with the ::: operator, so 
maptools:::write.pointShape will find it. Just make a 
SpatialPointsDataFrame first and write with writeSpatialShape() to make 
the script future-proof.

Hope this helps,

Roger

>
> Note that this script workes correctly under R 2.9 and earlier....
>
>
>
> no methods for 'write.pointShape' and no documentation for it as a function
>
> looking for documentation gives:
>
>> ?write.pointShape
> No documentation for 'write.pointShape' in specified packages and libraries:
> you could try '??write.pointShape'
>> ?write.pointShape()
> Error in .helpForCall(topicExpr, parent.frame()) :
>  no methods for 'write.pointShape' and no documentation for it as a function
>>
>
> The complete run-time output is given below......
>
> When I ran the
>
>
>
>
>
> R version 2.10.1 (2009-12-14)
> Copyright (C) 2009 The R Foundation for Statistical Computing
> ISBN 3-900051-07-0
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under certain conditions.
> Type 'license()' or 'licence()' for distribution details.
>
>  Natural language support but running in an English locale
>
> R is a collaborative project with many contributors.
> Type 'contributors()' for more information and
> 'citation()' on how to cite R or R packages in publications.
>
> Type 'demo()' for some demos, 'help()' for on-line help, or
> 'help.start()' for an HTML browser interface to help.
> Type 'q()' to quit R.
>
>> utils:::menuInstallPkgs()
> --- Please select a CRAN mirror for use in this session ---
> trying URL
> 'http://cran.cnr.Berkeley.edu/bin/windows/contrib/2.10/maptools_0.7-29.zip'
> Content type 'application/zip' length 1041753 bytes (1017 Kb)
> opened URL
> downloaded 1017 Kb
>
> package 'maptools' successfully unpacked and MD5 sums checked
>
> The downloaded packages are in
>        C:\Users\visitor.rover19\AppData\Local\Temp\RtmpLg4gih\downloaded_packages
>> ?write.pointShape
> No documentation for 'write.pointShape' in specified packages and libraries:
> you could try '??write.pointShape'
>> ?write.pointShape()
> Error in .helpForCall(topicExpr, parent.frame()) :
>  no methods for 'write.pointShape' and no documentation for it as a function
>>
>
> Is write.pointShape still supported under R 2.10?
>
>
> Thanks,
> Rick R
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-sig-Geo mailing list