compose_cells: Compose a Cell Analysis to a tidy form

View source: R/compose_cells.R

compose_cellsR Documentation

Compose a Cell Analysis to a tidy form

Description

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).

Usage

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)

r-rudra/tidycells documentation built on July 19, 2022, 5:10 a.m.