10 messages in org.r-project.r-help[R] convert to binary to decimal
FromSent OnAttachments
Martin FeldkircherFeb 15, 2007 7:37 am 
Marc SchwartzFeb 15, 2007 8:09 am 
Roland RauFeb 15, 2007 8:21 am 
Bert GunterFeb 15, 2007 8:52 am 
Roland RauFeb 15, 2007 9:13 am 
Marc SchwartzFeb 15, 2007 9:21 am 
Petr PikalFeb 15, 2007 11:19 pm 
Roland RauFeb 16, 2007 7:52 am 
Jim RegetzFeb 16, 2007 5:44 pm 
Henrik BengtssonFeb 17, 2007 5:14 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[R] convert to binary to decimalActions...
From:Roland Rau (rola@gmail.com)
Date:Feb 16, 2007 7:52:50 am
List:org.r-project.r-help

On 2/16/07, Petr Pikal <petr@precheza.cz> 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]]