Re: [R] Need help write a function

From: Sundar Dorai-Raj <sundar.dorai-raj_at_pdf.com>
Date: Wed 12 Oct 2005 - 04:35:08 EST

Jan Sabee wrote:
> Dear all,
> I am still learning R with write a small function for my self.
> I was wondering if someone can help me to write a R function formula below:
> Z_k (x) = \sum_{i=0}^{i=k} \binom{n}{i} (m-1)^i
> Thanks a million in advance,
>
> Sincerely,
> Jan Sabee
>

(This smells like a homework problem.)

What is "m"? Your Z_k is a function of "x" and there is no "x" on the RHS.

Are you trying to re-write "pbinom"?

--sundar



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Oct 12 04:43:42 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 18:41:07 EST