Q:

Fast way to select the maximum element of a row between some columns

I need to select the maximum element of a matrix row, but restricting my self to an interval between some columns. I need to do this several times and the "column range" in which I need to look changes each time. So far this is the binding constrain that prevents me to run simulations in a reasonable time. Below is an example of the sort of thing I'm doing. The code I need to optimize is mapply(function(x,y) apply(A[c(x,x:y,y),],2,max),Min,Max)
A=matrix(runif(100^2),ncol=100)
Min=sample(80,10000,replace=T)
Max=Min+sample(1:10,10000,replace=T)
system.time(mapply(function(x,y) apply(A[c(x,x:y,y),],2,max),Min,Max))
user  system elapsed 
1.52    0.01    1.54

A:

Here is an example using the matrixStats library.  Notice, I've answered your question.  The code you provide is 'inconsistent' with your question.  See my comment below your question.
library(matrixStats)

myA <- mapply(function(x,y) rowMaxs(A, cols = x:y), Min, Max)

To more effectively time your code, I made the following adjustments:
library(matrixStats)

n = 1e3

dim = 1e3

A = matrix(sample(100, dim*dim, replace = T), nrow = dim, ncol = dim)

Min = sample(dim*.8, n, replace = T)

Max = Min + sample(1:10, n, replace = T)

f1 <- function(){
  mapply(function(x,y) rowMaxs(A, cols = x:y), Min, Max)
}

f2 <- function(){
   mapply(function(x,y) apply(A[, c(x:y)], 1, max), Min ,Max)
}

When I time the rowMaxs approach it is about 37 times faster than the apply approach
 microbenchmark(f1(), f2(), times = 10)

Unit: milliseconds
 expr        min         lq       mean     median        uq       max neval
 f1()   76.20204   77.89764   98.98646   93.06952  107.3973  159.0868    10
 f2() 2806.49448 3340.67081 3652.18062 3417.00287 3637.7743 5130.4474    10

