| rows_add | R Documentation |
Add a conforming row, or elements of a conforming row to a names matrix.
rows_add(data_table, rows_to_add, row_names = NULL, empty_fill = 0)
data_table |
A symmetric input-output table, a use table,
a margins or tax table retrieved by the |
rows_to_add |
A data frame or a named numeric vector. |
row_names |
An optional name or vector of names for the key column. Defaults to |
empty_fill |
What should happen with missing column values? Defaults to |
If you want to add a single row manually, you can input a named numeric vector or a data frame with a single row. For multiple rows, input them as wide form data frame (see examples.)
An extended data_table with the new row(s) binded.
Other iotables processing functions:
conforming_vector_create(),
household_column_get(),
iotable_year_get(),
key_column_create(),
matrix_round(),
output_get(),
primary_input_get(),
supplementary_add(),
total_tax_add(),
vector_transpose_longer(),
vector_transpose_wider()
rows_to_add <- data.frame(iotables_row = "CO2_emission",
agriculture_group = 10448,
industry_group = 558327, # -> construction is omitted
trade_group = 11194)
rows_add (iotable_get(), rows_to_add = rows_to_add)
rows_add (iotable_get(),
rows_to_add = c(industry_group = 1534,
trade_group = 4),
row_names = "CH4_emission" )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.