On 2/16/07, Petr Pikal <[EMAIL PROTECTED]> wrote:
>
> Hi
>
> slight modification of your function can be probably even quicker:
>
> fff<-function(x) sum(2^(which(rev(x))-1))
> :-)
> Petr
>
>
Yes, your function is slightly but consistently faster than my suggestion.
But my "tests" show still Bert Gunter's function to be far ahead of the
rest.
Best,
Roland
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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, reproducible code.