Hello,
Try the following.
agg <- aggregate(buddleiat ~ samplet + datet, data = traffic, FUN = mean)
mrg <- merge(encounters, agg,
by.x = c("samplec", "datec"),
by.y = c("samplet", "datet"))
mrg$Div <- with(mrg, Bladen/buddleiat)
Hope this helps,
Rui Barradas
Em 18-09-2012 12:1
On Tue, Sep 18, 2012 at 12:17 PM, Marta Miguel wrote:
> Dear all,
>
>
> I have two different data frames, that have two common variables: date and
> sample. Here is a small extract of both of them
>
>> head(traffic)
> datetsessiont samplet buddleiat
> 1 07-08-20121 1
Dear all,
I have two different data frames, that have two common variables: date and
sample. Here is a small extract of both of them
> head(traffic)
datetsessiont samplet buddleiat
1 07-08-20121 1 1
2 07-08-20121 1 1
3 07-08-2012
3 matches
Mail list logo