Skip to content

routine write.pointShape missing from maptools under R 2.10?

2 messages · Rick Reeves, Roger Bivand

#
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)

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:
No documentation for 'write.pointShape' in specified packages and libraries:
you could try '??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.
--- 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
No documentation for 'write.pointShape' in specified packages and libraries:
you could try '??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
#
On Wed, 23 Dec 2009, reeves at nceas.ucsb.edu wrote:

            
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