constantdata

Returns constant data

var constant constantdata

Arguments
labeltypedescription
var variable Variable to be changed
constant number Constant to be applied
Returns
var' variable variable which matches the input variable but has constant values


Description

constantdata changes a variable to a user-selected constant value. This may come in handy, for instance, if you want to compare a variable to a constant value.

Example

SOURCES .KEELING .MAUNA_LOA .co2

dup

340 constantdata

This example makes a copy of the famous Mauna Loa monthly CO2 concentration time series and applies a constant value of 340 (parts per million, in this case) to all points in time in the copy.

Live Example Link