[R] Searching for antilog function

Spencer Graves spencer.graves at pdf.com
Wed Nov 24 20:17:55 CET 2004


      Consider: 

 > exp(log(1:11))
 [1]  1  2  3  4  5  6  7  8  9 10 11
 > 2^log(1:11, 2)
 [1]  1  2  3  4  5  6  7  8  9 10 11
 > 2^logb(1:11, 2)
 [1]  1  2  3  4  5  6  7  8  9 10 11
 > 10^log10(1:11)
 [1]  1  2  3  4  5  6  7  8  9 10 11
 > 2^log2(1:11)
 [1]  1  2  3  4  5  6  7  8  9 10 11

      Does this answer the question? 

      hope this helps. spencer graves

Heather J. Branton wrote:

> Dear R-users,
>
> I have a basic question about how to determine the antilog of a variable.
>
> Say I have some number, x, which is a factor of 2 such that x = 2^y. I 
> want to figure out what y is, i.e. I am looking for the antilog base 2 
> of x.
>
> I have found log2 in the Reference Manual. But I am struggling how to 
> get the antilog of that.
>
> Any help will be appreciated!
>
> > version
>
> platform i386-pc-mingw32
> arch     i386          os       mingw32       system   i386, mingw32 
> status                 major    1             minor    9.1           
> year     2004          month    06            day      21            
> language R
>
> ...heather
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html


-- 
Spencer Graves, PhD, Senior Development Engineer
O:  (408)938-4420;  mobile:  (408)655-4567




More information about the R-help mailing list