[R] Searching for antilog function
Duncan Murdoch
murdoch at stats.uwo.ca
Wed Nov 24 20:31:41 CET 2004
On Wed, 24 Nov 2004 12:26:46 -0500, "Heather J. Branton" <hjb at pdq.com>
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.
You seem to be confusing log with antilog, but log2(x) and 2^y are
inverses of each other, i.e.
log2(2^y) equals y
and
2^log2(x) equals x
(up to rounding error, of course).
Duncan Murdoch
More information about the R-help
mailing list