Skip to contents

Create a named vector (in wide format) that conforms to the structure of a given analytical object, such as a use table, coefficient matrix, or Leontief matrix. This helps avoid mistakes when manually defining large vectors (e.g., for 60 × 60 matrices).

Usage

conforming_vector_create(data_table)

Arguments

data_table

A use table, coefficient matrix, Leontief matrix, or other named matrix or data frame.

Value

A one-row data.frame with the same column names as data_table, but with all values set to zero.

Details

The empty conforming vector can also be exported to .csv format and used as a template for importing scenarios from a spreadsheet application.

Examples

de_input_flow <- input_flow_get(data_table = iotable_get())
conforming_vector_create(de_input_flow)
#>   iotables_row agriculture_group industry_group construction trade_group
#> 1            0                 0              0            0           0
#>   business_services_group other_services_group final_consumption_households
#> 1                       0                    0                            0