Not sure if this is the proper list to propose changes like this, if it passes constructive criticism, it would like to have a %between% operator in the R language.
I currently have this in my local R startup script: `%between%` <- function(x,...) { y <- range( unlist(c(...)) ) return( x >= y[1] & x =< y[2] ) } It allows me to do things like: 5 %between c(1,10) and also as act as an "in_range" operator: foo %between% a.long.list.with.many.values This may seem unnecessary, since 5 >= foo[1] && foo<= foo[2] is also quite short to type, but there is a mental cost to this, eg if you are deeply focused on a complicated program flow, the %between% construct is a lot easier to type out, and relate to, than the logically more complex construct with && and <=/>=, at least in my experience. -- mvh Torbjørn Lindahl [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.