[R] problem with size of array

2008-04-27 Thread Manoel Santos
+ > 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

Re: [R] reading information

2008-04-27 Thread Manoel Santos
someone? please i really need this [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide co

Re: [R] reading information

2008-04-26 Thread Manoel Santos
> p<-function(x){ + for(i in 1:teste2[k]+1){ + p2=c+teste2[3+i]*x^(i-1) + c=p2} + return(c)} > p3<-p(x) if i make this i can use a p(x) calling a function in anohter function? no , right? [[alternative HTML version deleted]] __ R-help@r-proj

[R] reading information

2008-04-26 Thread Manoel Santos
teste2 theta_chapeu f_estrela k a0 a1 a2 a3 13.21.2 3 2 1 4 5 > p<-function(k){ + i<-1 + for(i in 1:k){ + p2=teste2[3+i]} + return(p2)} > > p3- p3 a2 1 4 > p3[1] a2 1 4 how i can make an array with the polinomyal function? lilke p3[1]=1 p3[2]=4 p3[3]=5

[R] plotting two functions

2008-04-23 Thread Manoel Santos
i wanna compare functions to be simple , let's say i want x^2 and x^5 in same plot ( it's not the case but if i get it i'll understand for others ) how i do it? x<-seq(-10, 10, l=100) > plot(x^2) and? tks [[alternative HTML version deleted]]

Re: [R] plotting two functions

2008-04-23 Thread Manoel Santos
by the way, i want both in the same figure, not side by side or others.. tks [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-pro