## Misunderstanding of functions in R

I have a vector
p <- seq(0,1,length=11)
That I want to use as the independent variable in the summation
If I craft a function that codes the summation by hand
f <- function(a){
a^0*(1-a)^5+a^1*(1-a)^4+...
}
and pass it p, then I get t...

more
»