search for: theta_chapeu

Displaying 1 result from an estimated 1 matches for "theta_chapeu".

2008 Apr 27
1
problem with size of array
+ > p2<-function(r){ + gama=0 + for(i in 1:1000){ + c=caminho[[4]] + for(i in 1:caminho[[3]]+1) { + c=c+caminho[[i+3]]*((r[i])^(i-1)) + d=(abs(c))*exp(-(x^2/2))} + gama=gama + ( d/(h(r[i])) ) } + return(gama)} > e3<-p2(r) OBS: r is a rnorm(1000,0,1) > caminho theta_chapeu f_estrela k a0 a1 a2 a3 1 3.2 1.2 3 2 1 4 5 > question i wanted gama to be the sum of all.. but i keep getting gama as a array of 1000 values... ok r doesn't need u to creat variables and correct themm when needed but why it corrects gama in this case? like gama[1...