 <p>I've created an overly complex solution that allows you to create a helper function to do an inline type of rang value finder. The ranger function takes the cut points you want to split on and then returns a function that will choose the value of the parameter based on which interval it falls. It primarily uses <code>findInterval</code> but unfortunately you inequalities don't exactly line up with how <code>findInterval</code> likes to do them so I had to do some fiddling.</p> <pre><code>#meta-helper function ranger&lt;-function(rng) { function(x, ...) { dots&lt;-list(...) stopifnot(ncol(dots)==length(rng)+1) m&lt;-findInterval(x, rng)+1 ex&lt;-match(x, rng); if (any(!is.na(ex))) { m[which(ex&gt;1)]&lt;-ex[which(ex&gt;1)] } out&lt;-rep(NA, length(x)) for(i in seq_along(dots)) { out[m==i]&lt;-rep(dots[[i]], length.out=length(x))[m==i] } out; } } #helper function abc&lt;-ranger(c(600,4000)) #implementation 1 x&lt;-c(100,2000,5000) a&lt;-abc(x, 0.01, 0.1, 0.12)*x + abc(x, 0, 118, -162); a; #implementation 2 a&lt;-abc(x, x * 0.01, 118 + (x*0.1), 318 + ((x-4000)*0.12)); a; </code></pre> <p>So while it may not be the best choice in this case, i might be useful if you have a bunch of different ranges or something like that.</p>