After analyze_cells carried out, you may like to use this function in order to stitch the cells together as per the analyzed results, to form a meaningful structural representation (like tidy format).

compose_cells(ca, post_process = TRUE, attr_sep = " :: ",
  discard_raw_cols = FALSE, print_attribute_overview = FALSE,
  silent = FALSE)

Arguments

ca

a cell_analysis to process

post_process

logical scalar. If disabled a list will be returned without performing post-processing. (Default TRUE)

attr_sep

a character string to separate the attributes. (Default is <space>::<space>)

discard_raw_cols

logical scalar. If enabled only main processed columns will be returned. (Default FALSE)

print_attribute_overview

print the overview of the attributes (4 distinct values from each attribute of each block)

silent

whether to suppress warning message on compose failure (Default FALSE)

Value

a data.frame (as tibble) in tidy form.

Examples

cd <- 1:(9) %>% matrix(nrow = 3) %>% as_cell_df() cd <- sample_based_classifier(cd, attribute_sample = "1") cd <- cd %>% dplyr::filter(value != "1") ca <- analyze_cells(cd) compose_cells(ca)
#> # A tibble: 4 x 8 #> row col data_block value major_1 major_2 major_row_left_~ major_col_top_1~ #> <int> <int> <dbl> <chr> <chr> <chr> <chr> <chr> #> 1 2 2 1 5 2 4 2 4 #> 2 3 2 1 6 3 4 3 4 #> 3 2 3 1 8 2 7 2 7 #> 4 3 3 1 9 3 7 3 7