Erik Iverson <eriki <at> 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-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to