Learn R Programming

iotables (version 0.9.4)

household_column_find: Find Household Expenditure Column

Description

Identify the column position corresponding to final household expenditure in a symmetric input–output table or related table.

Usage

household_column_find(data_table)

Value

An integer vector giving the position(s) of household expenditure columns. Returns NULL if none are found.

Arguments

data_table

A symmetric input–output table, a use table, or a supply table.

Details

The function searches column names case-insensitively. It first looks for exact matches among the following alternatives:

  • "households"

  • "p3_s14"

  • "final_consumption_households"

  • "final_consumption_household"

  • "consumption_expenditure_household"

  • "consumption_expenditure_households"

If none of these are found, it falls back to any column name that contains "households".

See Also

Other iotables processing functions: conforming_vector_create(), empty_remove(), household_column_get(), iotable_year_get(), key_column_create(), matrix_round(), output_get(), primary_input_get(), rows_add(), supplementary_add(), total_tax_add(), vector_transpose_longer(), vector_transpose_wider()

Examples

Run this code
# German SIOT includes a household final consumption column
household_column_find(iotable_get(source = "germany_1995"))

# Custom example
df <- data.frame(
  sector = c("A", "B"),
  households = c(100, 200)
)
household_column_find(df)

Run the code above in your browser using DataLab