indx <- match(u$nam, v$enter, nomatch = 0)
u$coe[indx != 0] <- v$coeff[indx]
Sent from my iPad
On Feb 5, 2012, at 15:45, Valerie Moore wrote:
> Hi,
>
> I have two data frames (u and v).
>
>> u
> coe nam
> 1 0 Time
> 2 0Poten
> 3 0 AdvExp
> 4 0Share
> 5 0 Chang
Hi,
I have two data frames (u and v).
> u
coe nam
1 0 Time
2 0 Poten
3 0 AdvExp
4 0 Share
5 0 Change
6 0 Accounts
7 0 Work
8 0 Rating
> v
coeff enter
1 0.7272727 Accounts
2 0.322 Time
3 0.0500123 Poten
I want to update the values
2 matches
Mail list logo