collate_columns: Collate Columns Based on Content

Description Usage Arguments Details Value Examples

View source: R/collate_columns.R

Description

After compose_cells, this function rearranges and rename attribute-columns in order to make columns properly aligned, based on the content of the columns.

Usage

1
2
3
4
5
6
7
collate_columns(
  composed_data,
  combine_threshold = 1,
  rest_cols = Inf,
  retain_other_cols = FALSE,
  retain_cell_address = FALSE
)

Arguments

composed_data

output of compose_cells (preferably not processed)

combine_threshold

a numerical threshold (between 0-1) for content-based collation of columns. (Default 1)

rest_cols

number of rest columns (beyond combine_threshold joins these many numbers of columns to keep)

retain_other_cols

whether to keep other intermediate (and possibly not so important) columns. (Default FALSE)

retain_cell_address

whether to keep columns like (row, col, data_block). This may be required for traceback (Default FALSE)

Details

Value

A column collated data.frame

Examples

1
2
3
4
5
6
7
8
d <- system.file("extdata", "marks_cells.rds", package = "tidycells", mustWork = TRUE) %>%
  readRDS()
d <- numeric_values_classifier(d)
da <- analyze_cells(d)

dc <- compose_cells(da, print_attribute_overview = TRUE)

collate_columns(dc)

tidycells documentation built on March 26, 2020, 7:35 p.m.