Thank you very much DJ MuseR!
Curtis K
~ Sent from a PDA. I apologize in advance for any typing errors.
On Nov 8, 2011, at 4:36 PM, "djmuseR [via R]"
wrote:
> Here's another approach using the plyr and data.table packages, where
> df is the name I gave to your example data:
>
> # plyr
Here's another approach using the plyr and data.table packages, where
df is the name I gave to your example data:
# plyr
library('plyr')
ddply(df, .(TIME), mutate, L1 = sort(S1))
# Another way with the data.table package:
library('data.table')
dt <- data.table(df, key = 'TIME')
dt[, list(X1, S1,
On Nov 8, 2011, at 2:58 PM, economicurtis wrote:
I have panel data in the following form:
TIME X1 S1
1 1 0.99
1 2 0.50
1 3 0.01
2 3 0.99
2 1 0.99
2 2 0.25
3 3 0.75
3 2 0.50
3 1 0.25
...
I have panel data in the following form:
TIME X1 S1
1 1 0.99
1 2 0.50
1 3 0.01
2 3 0.99
2 1 0.99
2 2 0.25
3 3 0.75
3 2 0.50
3 1 0.25
... ... ..
And desire a new vector o
4 matches
Mail list logo