metastate at gmail.com
Wed Aug 19 02:57:53 CEST 2015
I tried to use sp merge to join the spatialpolygonddataframe (xx) and an
dataframe (yy4), which have 2 observations for each spatial ID. But it did
not allow with an error message as below:
Error in .local(x, y, ...) : 'y' has multiple records for one or more
I also tried the mapmerge in eeptools but failed.
Any suggestion? Thank you very much.
xx <- maptools::readShapePoly(system.file("shapes/sids.shp",
On Tue, Aug 18, 2015 at 7:31 PM, Metastate Metastate <metastate at gmail.com>
> Cool. Let me take a look. Thank you very much, Loïc.
> On Tue, Aug 18, 2015 at 3:31 AM, Loïc Dutrieux <loic.dutrieux at wur.nl>
>> Have a look at merge in the sp package.
>> On 08/18/2015 04:12 AM, Metastate Metastate wrote:
>>> Hi all,
>>> I am starting to learn spatial analysis using R. Do anyone know if the
>>> attribute data in a spatialpolygonsdataframe can contain multiple
>>> observations within the same polygon? To be specific, I have a
>>> spatialpolygonsdataframe that contain USA county polygons and the
>>> attribute data contains the relevant state,county and FIPs. And I also
>>> have another data-frame that contains weather features by year by county
>>> (For example there are yearly average temperature for each county) . How
>>> can I join the spatialpolygondataframe with the weather data so that the
>>> resulted attribute table in the joint spatialpolygonsdataframe can
>>> *multiple-year* weather features within each county?
>>> Thank you very much for any kindly help.
>>> [[alternative HTML version deleted]]
>>> R-sig-Geo mailing list
>>> R-sig-Geo at r-project.org
>> R-sig-Geo mailing list
>> R-sig-Geo at r-project.org
[[alternative HTML version deleted]]
More information about the R-sig-Geo