Re: [R] Searching for antilog function

2016-05-31 Thread Richard M. Heiberger
Use power > log(78,10) [1] 1.892095 > 10^log(78,10) [1] 78 On Tue, May 31, 2016 at 4:14 PM, Carlos wrote: > The following function can do the work as well > > antilog<-function(lx,base) > { > lbx<-lx/log(exp(1),base=base) > result<-exp(lbx) > result > } > > This solution is based on the ch

[R] Searching for antilog function

2016-05-31 Thread Carlos
The following function can do the work as well antilog<-function(lx,base) { lbx<-lx/log(exp(1),base=base) result<-exp(lbx) result } This solution is based on the change of base formula which states that : log (x,base=b) = log(x,base=a)/log(b,base=a) The original logarithm is changed into