[R] I have a problem with the log2 function

Frank Mattes f.mattes at ucl.ac.uk
Wed Oct 29 14:14:59 CET 2003


Dear R users,

according the help(log), the function
log2(x) should give the natural logarithm of x.

I expect in case of x=2 to to get 0.6931, however, R gives me 1 as a result.

Similar, logb(2,2) gives 1 again.

I'm wondering if I have missed something ?

Yours
Frank


-- 
Frank Mattes, MD			e-mail:	f.mattes at ucl.ac.uk
Department of Virology			fax	0044(0)207 8302854
Royal Free Hospital and 			tel	0044(0)207 8302997
University College Medical School
London




More information about the R-help mailing list