>
> -Original Message-
> From: [EMAIL PROTECTED] on behalf of Yasir Kaheil
> Sent: Tue 5/6/2008 4:24 PM
> To: r-help@r-project.org
> Subject: Re: [R] Spatial join between two datasets using x and y co-ordinates
>
>
> vector dat1.select is the selecte
Hi Andrew,
Try also:
x1<-c(1824615,1823650,1821910)
y1<-c(5980732,5983220,5990931)
descript<-c("cat", "dog", "horse")
dat1<-data.frame(x1,y1,descript)
x2<-c(1824615,1823650)
y2<-c(5980732,5983220)
dat2<-data.frame(x2,y2)
colnames(dat2)=c('x1','y1')
merge(dat1,dat2,by=c('x1','y1'))
HTH,
Jorge
vector dat1.select is the selected records from dat1 by dat2.
> dat1.select<- dat1$x1 %in% dat2$x2 & dat1$y1 %in% dat2$y2
> dat1[dat1.select,]
x1 y1 descript
1 1824615 5980732 cat
2 1823650 5983220 dog
Andrew McFadden wrote:
>
> Hi R users
>
> I am trying to create a sp
Andrew
?merge
HTH ..
Peter Alspach
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Andrew McFadden
> Sent: Wednesday, 7 May 2008 9:23 a.m.
> To: r-help@r-project.org
> Subject: [R] Spatial join between two datasets u
Hi R users
I am trying to create a spatial join between two datasets.
The first data set is large and contains descriptive data including x
and y co-ordinates.
The second dataset is small and has been selected spatially. The only
data contained within the second dataset is the x and y coordina
5 matches
Mail list logo