| To: | gerald.jean@dgag.ca, s-news@wubios.wustl.edu |
|---|---|
| Subject: | Re: Speeding up a for loop |
| From: | "Richard M. Heiberger" <rmh@temple.edu> |
| Date: | Wed, 24 Nov 2004 09:17:38 -0500 |
I think what you need can be constructed with this as the model
A <- data.frame(names=LETTERS, b=sample(1:26))
B <- data.frame(names=c("B","W","M"), value=c(31,32,33))
A[match(B$names, A$names), "b"] <- B$value
Rich
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Speeding up a for loop, gerald . jean |
|---|---|
| Next by Date: | Re: Speeding up a for loop, David L Lorenz |
| Previous by Thread: | Speeding up a for loop, gerald . jean |
| Next by Thread: | Re: Speeding up a for loop, David L Lorenz |
| Indexes: | [Date] [Thread] [Top] [All Lists] |