These functions can be used to get or set the gain and offset parameters used to transform values when reading them from a file. The gain and offset parameters are applied to the raw values using the formula below:
value <- value * gain + offset
The default value for gain is 1 and for offset is 0. 'gain' is sometimes referred to as 'scale'.
Note that setting gain and/or offset are intended to be used with values that are stored in a file. For a Raster* object with values in memory, assigning gain or offset values will lead to the inmediate computation of new values; in such cases it would be clearer to use
1 2 3 4
Single numeric value
Raster* object or numeric value(s)
1 2 3 4 5 6 7 8
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.