# 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