Learn R Programming

flattabler (version 1.2.0)

get_col_values: 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)

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.

Arguments

lpt

List of tables.

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.

See Also

Other pivot table transformation functions: extract_labels(), fill_labels(), fill_values(), remove_agg(), remove_k(), replace_dec()

Examples

Run this code
df <- get_col_values(list_pt_compact, start_row = 4)
labels <- sort(unique(df$label))

Run the code above in your browser using DataLab