Learn R Programming

iotables (version 0.9.4)

total_tax_add: Add a total tax row (D.2–D.3 and D.29–D.39)

Description

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.

Usage

total_tax_add(
  data_table,
  tax_names = c("d21x31", "d29x39"),
  total_tax_name = "TOTAL_TAX"
)

Value

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.

Arguments

data_table

A symmetric input–output table (SIOT) or use table whose primary inputs include tax rows (see Details). Typically obtained via iotable_get().

tax_names

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.

total_tax_name

Character scalar for the new row label. Default "TOTAL_TAX". (See Enhancements regarding case handling.)

Terminology

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.

Details

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.

References

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.

See Also

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()

Examples

Run this code
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