[R] creating a vector automatically containing numbers 1, 100, 10000, 1000000, ...

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Tue Sep 27 10:50:33 CEST 2011


On Tue, Sep 27, 2011 at 9:33 AM, Marion Wenty <marion.wenty at gmail.com> wrote:
> hello,
>
> i am looking for a way to get a vector containing the numbers:
>
> 1,100,10000,1000000,...
>
> each element should have two ceros more than the one before it until the
> number
>
> 1e+200
>
> without using a loop.

 10^(seq(0,200,by=2)

Barry



More information about the R-help mailing list