[R] Coercing of types when raising a number to a series of powers

Julio Sergio juliosergio at gmail.com
Fri Feb 8 03:13:02 CET 2013

I'm trying to produce a series of powers of a number as follows:

  |> 0.05^0:5
   [1] 1 2 3 4 5

This is not the result I expected. I guess some kind of coercion happened,

  |> class(0.05^0:5)
   [1] "integer"

Could anyone explain me what is happening here?



More information about the R-help mailing list