View source: R/vector_transpose.R
vector_transpose_longer | R Documentation |
Many vectors (indicators, multipliers) are create in the wide form to conform matrixes in analytical functions. For printing it is more useful to have them in long form.
vector_transpose_longer( data_table, names_to = "nace_r2", values_to = "value", key_column_name = NULL, .keep = FALSE ) vector_transpose( data_table, names_to = "nace_r2", values_to = "value", key_column_name = NULL, .keep = FALSE )
data_table |
A matrix or vector that normally has a key column. |
names_to |
Defaults to |
values_to |
Defaults to |
key_column_name |
The name of the first column. Defaults to |
.keep |
Keep the indicator identifier column? Defaults to |
This is a wrapper around pivot_longer
so you do not necessarily need to
import or load the entire tidyr package.
A long form vector with a key column, and optionally the identifier of the indicator in the first column.
Other iotables processing functions:
conforming_vector_create()
,
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_wider()
vector_transpose_longer( data.frame(indicator = "my_inidcator", agriculture = 0.0123, manufacturing = 0.1436, trade = 0.0921) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.