Skip to contents

The phi_vecs argument of move_to_exergy() is a data frame with "Country", "Year", and "phi" columns, where the "phi" column contains phi vectors of the type created by MWTools::phi_vec_mw(). This function creates the required data frame from its parts.

Usage

calc_phi_vecs_mw(
  psut_energy_mw,
  phi_vec_mw,
  countries,
  country = MWTools::mw_cols$country,
  year = MWTools::mw_cols$year,
  phi = "phi"
)

Arguments

psut_energy_mw

A PSUT data frame containing country and year columns.

phi_vec_mw

A single vector of muscle work phi values. See MWTools::phi_vec_mw().

countries

The countries to be analyzed. Internally, psut_energy_mw is filtered for countries.

country, year

Column names. See MWTools::mw_cols.

phi

The name of the phi column. Default is "phi".

Value

A data frame of muscle work phi vectors, suitable for move_to_exergy().