 
Roger
Thank you. Your suggestion worked perfectly.
Joe
 
>In a message dated 11/5/2009 4:32:37 A.M. Mountain Standard Time,  
Roger.Bivand@nhh.no writes:

On Thu,  5 Nov 2009, Roger Bivand wrote:

> On Thu, 5 Nov 2009,  BRWIN338@aol.com wrote:
>
>> Good Evening
>>  
>> I have two spatial polygon objects. The first   "StMaps50"  contains 
state
>> level map data for the 50 US  states.  The second  "CAMaps" contains
>> provincial and  territorial polygons  for Canada.  I would like to merge 
 
>> these two
>> objects into a  single Canada-US  spatial polygon object that I could 
then 
>> write
>> to  a  shapefile.  The data fields in the @data component have  been
>> constructed  with identical fields.  I have tried  using the  maptools 
>> "spRbind"
>> function but get  the following error  message:
>
> With recent versions of sp,  you can say:
>
> rownames(StMaps50)
>  rownames(CAMaps)

Sorry, on  checking:

row.names(StMaps50)
row.names(CAMaps)

(rownames()  is a method for matrices, row.names() for data.frames and  
friends).

Roger

>
> By default, the IDs for each  Polygons object, corresponding to each row 
in 
> the data.frame object  in the "data" slot, are the feature IDs read in 
form 
> file. In the  case of shapefiles, these usually run from "0" to say n-1. 
So 
> they  will be the same. Use the spChFIDs() method in maptools to change 
the 
>  IDs of at least one of your objects to disambiguate them (say paste "US" 
in  
> front of the US ones and "CAN" in front of the Canadian ones). I'm  also 
> assuming the the coordinate reference systems are  identical.
>
> Hope this  helps,
>





	[[alternative HTML version deleted]]

