Skip to contents

[Deprecated]

scale_param is now the preferred function since it works for both point and gridded data.

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.

Usage

scale_point_obs(
  .obs,
  parameter,
  scale_factor,
  new_units = NULL,
  multiplicative = FALSE
)

Arguments

.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 default (multiplicative = FALSE) is to do the scaling additively, i.e. the new forecast value is the old value + scale_factor.

Value

The observations data frame with the parameter column scaled by scale_factor.