PageRenderTime 15ms CodeModel.GetById 13ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/working/auteur/R/withinrange.R

http://github.com/eastman/auteur
R | 10 lines | 6 code | 2 blank | 2 comment | 2 complexity | bbe63be7f8059b6d8d3f139e5db95c61 MD5 | raw file
 1#determines if a value falls within a range [min,max]
 2#author: JM Eastman 2010
 3
 4withinrange <-
 5function(x, min, max) {			 
 6	a=sign(x-min)
 7	b=sign(x-max)
 8	if(abs(a+b)==2) return(FALSE) else return(TRUE)
 9}
10