Skip to contents

This function filters to countries and creates PSUT matrices from primary-final-useful muscle work data frames.

Usage

make_mw_psut(
  .hmw_df,
  .amw_df,
  countries,
  years,
  matrix_class = c("matrix", "Matrix"),
  output_unit = c("TJ", "ktoe"),
  country = MWTools::mw_cols$country,
  year = MWTools::mw_cols$year
)

Arguments

.hmw_df, .amw_df

Data frames of primary-final-useful muscle work data.

countries

The countries to be analyzed.

years

The years to be analyzed.

matrix_class

The type of matrix to be created. One of "matrix" (the base class) or "Matrix" (for sparse matrices).

output_unit

A string of length one that specifies the output unit. One of "TJ" or "ktoe" for terajoules or kilotons of oil equivalent.

country

The name of the country column in .hmw_df and .amw_df. Default is MWTools::mw_cols$country.

year

The name of the year column in .hmw_df and .amw_df.Default is MWTools::mw_cols$year.

Value

A data frame of PSUT matrices for a muscle work energy conversion chain.