Skip to content
Prev 75108 / 398502 Next

help regarding functions & loops

Hi Rangesh,

Perhaps I mis-understand your question, but it could be as simple as...

p <- 1-exp(-exp(s))

In R, this is vectorized such that a new vector is calculated - one
value for each value of s, so p will have the same length as s.

In the "Introduction to R" read up on vectors and how to avoid loops.

cheers!
Sean
On 06/08/05, Rangesh Kunnavakkam <rangeshk at gmail.com> wrote: