Calculates the relative difference of the reference and the scenarios in a new column

scen_diff(data, vars_to_diff, ref)

Arguments

data

A dataframe

vars_to_diff

A vector with the names of the variables to calculate the difference

ref

The name of the reference scenario

Value

A dataframe with the new columns