On May 23, 2010, at 1:43 PM, Erik Iverson wrote:
Hello,
Can anyone think of a non-iterative way to generate a decreasing
geometric sequence in R?
For example, for a hypothetical function dg, I would like:
> dg(20)
[1] 20 10 5 2 1
where I am using integer division by 2 to get each subsequ
Erik Iverson ccbr.umn.edu> writes:
> Can anyone think of a non-iterative way to generate a decreasing geometric
> sequence in R?
Reduce("%/%",rep(2,4),init=20,accum=TRUE)
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-he
Erik Iverson writes:
> Hello,
>
> Can anyone think of a non-iterative way to generate a decreasing
> geometric sequence in R?
>
> For example, for a hypothetical function dg, I would like:
>
>> dg(20)
> [1] 20 10 5 2 1
>
> where I am using integer division by 2 to get each subsequent value in
> t
Erik Iverson wrote:
Hello,
Can anyone think of a non-iterative way to generate a decreasing geometric
sequence in R?
For example, for a hypothetical function dg, I would like:
> dg(20)
[1] 20 10 5 2 1
where I am using integer division by 2 to get each subsequent value in the
sequence.
Hello,
Can anyone think of a non-iterative way to generate a decreasing geometric
sequence in R?
For example, for a hypothetical function dg, I would like:
> dg(20)
[1] 20 10 5 2 1
where I am using integer division by 2 to get each subsequent value in the
sequence.
There is of course:
d
5 matches
Mail list logo