[R] filling array with functions

derek jan.kacaba at gmail.com
Sun Apr 24 15:37:18 CEST 2011


Thats not exactly what I hoped for. But for now it has to suffice. More
transparent  syntax would be nicer.

Exactly what I would like to do is:

for (i in 1:9){
f[i]<-function(x){
a*x+b)
}
curve(f[i],  0,  8)
sol[i]<-uniroot(f[i],c(0,  8))$root
points(sol[i],0,pch=16,cex=1,col="red")
}

Perhaps is item for a wish list?

--
View this message in context: http://r.789695.n4.nabble.com/filling-array-with-functions-tp3468313p3471463.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list