search for: rangit

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

Did you mean: rangi
2006 Apr 06
1
Evaluating a function with another function
Hello all, I hope someone can help me with this. I have function that calculates two values based on input data. A simple example follows: test<-function(x,s,rangit=seq(0,10,1)) { rangit<-rangit y<-vector() p<-vector() for(i in 0:length(rangit)){ y[i]<-x+s[1]+rangit[i] p[i]<-x+s[2]+rangit[i] } return(data.frame(rangit,y,p)) } And returns the following: rangit y p 1 0 2 3 2 1 3 4 3 2 4 5 4 3 5 6 5 4 6...