coefficient_matrix_create: Create a coefficient matrix
Description
Create a coefficient matrix from a Symmetric Input-Output Table. The
coefficient matrix is related by default to output, but you can change
this to total supply or other total aggregate if it exists
in your table.#'
A symmetric input-output table, a use table,
a margins or tax table retrieved by the iotable_get
function.
total
Usually an output vector with a key column, defaults to
"output" which equals "P1" or "output_bp".
You can use other rows for comparison, for example "TS_BP"
if it exists in the matrix.
digits
An integer showing the precision of the technology matrix in
digits. Default is NULL when no rounding is applied.
remove_empty
Defaults to TRUE. If you want to keep empty
primary input rows, choose FALSE. Empty product/industry rows are
always removed to avoid division by zero error in the analytic functions.
households
Defaults to NULL. Household column can be added
with TRUE.
return_part
Defaults to NULL. You can choose "product"
or "industry" to return an input coefficient matrix or
"primary_inputs" to get only the total intermediate use and
proportional primary inputs.
Value
A data.frame that contains the matrix of data_table divided
by total with a key column. Optionally the results are rounded to
given digits.