Create and append a total tax row by summing selected tax rows in the primary inputs block (Quadrant III) of a SIOT or use table.
total_tax_add(
data_table,
tax_names = c("d21x31", "d29x39"),
total_tax_name = "TOTAL_TAX"
)
A data frame like data_table
, with one additional row named
total_tax_name
that equals the element-wise sum of the rows in
tax_names
over numeric columns.
A symmetric input–output table (SIOT) or use table
whose primary inputs include tax rows (see Details). Typically obtained
via iotable_get()
.
Character vector of row labels to sum. Defaults to
c("d21x31","d29x39")
, shorthand for D.2–D.3 and D.29–D.39. Matching
is currently made against the lower-cased key column.
Character scalar for the new row label. Default
"TOTAL_TAX"
. (See Enhancements regarding case handling.)
Eurostat uses the lines “Taxes less subsidies on products” and “Other net taxes on production” in published tables; these correspond, respectively, to D.2–D.3 and D.29–D.39.
In Eurostat/ESA terminology, tax rows commonly include:
Taxes less subsidies on products (codes D.2–D.3), and
Other net taxes on production (codes D.29–D.39).
These appear in the value-added (primary inputs) section of the use/SIOT
layout. The function sums the specified rows column-wise over all
numeric columns and appends the result as total_tax_name
. If a household
final consumption column is present (e.g. final_consumption_households
or p3_s14
), any missing value in the new total row is replaced by zero.
Eurostat (2008). Eurostat Manual of Supply, Use and Input–Output Tables, ch. 13. United Nations (2018). Handbook on Supply and Use Tables and Input–Output Tables with Extensions and Applications (Rev. 1, “white cover”), ch. 10.
Other iotables processing functions:
conforming_vector_create()
,
empty_remove()
,
household_column_find()
,
household_column_get()
,
iotable_year_get()
,
key_column_create()
,
matrix_round()
,
output_get()
,
primary_input_get()
,
rows_add()
,
supplementary_add()
,
vector_transpose_longer()
,
vector_transpose_wider()
de_io <- iotable_get()
total_tax_add(
data_table = de_io,
tax_names = c("net_tax_products", "net_tax_production"),
total_tax_name = "total_tax"
)
Run the code above in your browser using DataLab