View source: R/data_units_and_scaling.R
scale_point_obs | R Documentation |
If you wish to scale the observations values, for example when temperature data are in Kelvin and you want them in degrees C, this function can be used to scale the data.
scale_point_obs( .obs, parameter, scale_factor, new_units = NULL, multiplicative = FALSE )
.obs |
A data frame of point observations as read in by read in by read_point_obs from harpIO. |
parameter |
The column name of the data to be scaled. Must be unquoted. |
scale_factor |
The scaling factor. |
new_units |
The name of the new units - if set to NULL, the name is not changed. |
multiplicative |
If the scaling is to be done multiplicatively, i.e. the new forecast value is to be the old value * scale_factor, set multiplicative to TRUE. The defualt (multiplicative = FALSE) is to do the scaling additively, i.e. the new forecast value is the old value + scale_factor. |
The observations data frame with the parameter column scaled by
scale_factor
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.