thank you everybody, again. regards, /iaw
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, repr
If you want to put it back in the original data frame:
> ds= data.frame( xn=rnorm(32), yn=rnorm(32), zn=rnorm(32) )
> ds$drank1group= as.integer((rank( ds$xn )-1)/4) # ok, the first set
> ds$drank2group <- ave(ds$yn, ds$drank1group, FUN=rank)
> ds
xn yn zn drank1grou
Hi
I think you want something like,
with(ds, tapply(yn, drank1group, rank) )
also, the reshape package should do this sort of thing neatly.
Hope this helps,
baptiste
On 25 Aug 2008, at 16:10, ivo welch wrote:
Dear R wizards: First, thanks for the notes on SQL. These pointers
will make
Dear R wizards: First, thanks for the notes on SQL. These pointers
will make it a lot easier to deal with large data sets. Sorry to
have a second short query the same day. I have been staring at this
for a while, but I cannot figure out how to do a dependent ranking the
R-sh way.
ds= data.fra
4 matches
Mail list logo