# NOT RUN {
# if n is not a non-negative interger, function returns NaN with a warning
rgood ( n = -100 , z = 0.5 , s = -3 )
# if th is not positive, th is replaced by 1e-06 and a warning is provided
rgood ( n = 1 , z = 0.5 , s = -3 , th = -9 )
# if z is not within 0 and 1, NaN is returned with a warning
rgood ( n = 2 , z = c( -0.5, 0.5 ) , s = -3 )
rgood ( n = 10 , z = 0.6 , s = -3 )
rgood ( n = 1000 , z = 0.6 , s = -3 )
rgood ( n = c ( 3 , 10 ) , z = 0.6 , s = -3 )
rgood ( n = c ( 3 , 10 ) , z = c ( 0.2 , 0.8 ) , s = - 3 )
rgood ( n = c ( 3 , 10 , 6 ) , z = c ( 0.2 , 0.8 ) , s = c ( - 3 , -2 ) )
rgood ( n = 1000 , z = 0.3 , s = - 170 )
# }
Run the code above in your browser using DataLab