Linear stretch of values in a Raster object. Provide the desired output range (minv and maxv) and the lower and upper bounds in the original data, either as quantiles (if minq=0 and maxq=1 you use the minimum and maximum cell values), or as actual values (smin and smax; e.g. precomputed quantile values). If smin and smax are both not NA, minq and maxq are ignored.