get_col_values: Get column values

View source: R/table_list.R

get_col_valuesR Documentation

Get column values

Description

Gets the values of the indicated column of each table in a list of tables, avoiding the rows at the beginning or the end of each table that are indicated.

Usage

get_col_values(lpt, col = 1, start_row = 2, rows_left = 0)

Arguments

lpt

pivot_table object list.

col

A number, column to consider.

start_row

A number, start row in each table.

rows_left

A number, rows to ignore at the end of each table.

Details

Sometimes a column includes values of multiple label fields. To facilitate the study of the labels included in the same column of several tables, this function gets the values of the indicated column in a list of tables.

Value

Data frame with two columns: Labels in the column, and the index of the table in the list of tables from which they come.

See Also

pivot_table

Other flat table list functions: divide(), flatten_table_list()

Examples


pt <- pivot_table(df_set_h_v)
lpt <- pt |> divide()
df <- get_col_values(lpt, col = 1, start_row = 4)
labels <- sort(unique(df$label))


flattabler documentation built on Sept. 15, 2023, 1:06 a.m.