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

Julio Sergio juliosergio at gmail.com
Fri Feb 8 03:21:00 CET 2013


Julio Sergio <juliosergio <at> gmail.com> writes:

> 
> I'm trying to produce a series of powers of a number as follows:
> 
>   |> 0.05^0:5


I'm sorry for the question. The answer is simple: the result is due to
operator precedence not to coercing:

  |> 0.05^(0:5)
  [1] 1.000e+00 5.000e-02 2.500e-03 1.250e-04 6.250e-06 3.125e-07



More information about the R-help mailing list