applyFlat: Apply a vectorized binary operation recycling over last dimension
Description
When x is an array of order K, and y is an array of order K-1,
whose dimensions otherwise agree,
apply FUN by recycling y as necessary over dimension K of x.
# NOT RUN {##Dumb example, could be done with scale(...,scale=FALSE)# }# NOT RUN {x0 = matrix(1:10, ncol=2)
y0 = colMeans(x0)
dim(y0) = c(2,1)
x1 = applyFlat(x0,y0)
stopifnot(colMeans(x1)==0)
# }