Displaying 1 result from an estimated 1 matches for "testexp".
Did you mean:
testext
2006 Apr 06
1
Evaluating a function with another function
...what I want. The part I am having trouble with is that I want
to write another function that will evaluate the previous function at
multiple levels of x, where the levels of x may not always be the same
length
I have tried several options but so far have not been able to figure it
out.
I tried:
testexp<-function(x,s,rangit){
out<-data.frame()
for (j in 1:length(x)){
out[j]<-test(x[j],s)
}
return(out)
}
Q2<-testexp(x=c(1:4),s=c(1,2))
But that returns a warning with no values. I have also tried various
other methods with no success.
Basically what I want the output to look like...