Re: [R] error in Recursive

2012-01-10 Thread Berend Hasselman
arunkumar wrote > > Hi > > I need help in the recursive problem. this is my code > > #Generate two random Numbers > minval=20 > maxval=100 > cutoffValue=50 > > optVal<- function(cutoffValue,minval,maxval) > { >x=runif(2) >x=x*cutoffValue >for( i in 1:2) > { > if(x[i

[R] error in Recursive

2012-01-09 Thread arunkumar1111
Hi I need help in the recursive problem. this is my code #Generate two random Numbers minval=20 maxval=100 cutoffValue=50 optVal<- function(cutoffValue,minval,maxval) { x=runif(2) x=x*cutoffValue for( i in 1:2) { if(x[i] < 30 || x[i] >60) # checking it falls between the ra