rpart.tree: Recursive partitioning tree

View source: R/rpart.tree.R

rpart.treeR Documentation

Recursive partitioning tree

Description

This function performs a recursive partitioning tree using the percentage (or raw counts) of identified cell populations. Depending if time.var is present or absent, final tree were a cassification or regression tree, respectively.

Usage

rpart.tree(
  fcs.SCE,
  cell.clusters,
  variables,
  value = "percentage",
  time.var,
  event.var,
  xerror,
  rpart.control,
  return.data = T
)

Arguments

fcs.SCE

A fcs.SCE object generated through FlowCT::fcs.SCE().

cell.clusters

Name of column containing clusters identified through FlowCT::clustering.flow().

variables

Vector with variables for calculating the cutoff. If nothing is detailed (NULL, default), all immune populations from cell.clusters will be considered.

value

String specifying if final resuls should be proportions ("percentage", default) or raw counts ("counts").

time.var

Survival time variable.

event.var

Variable with event censoring.

xerror

Numeric value with cross-validation error for pruning the tree. If missing, the minimal error will be automatically selected.

rpart.control

List with parameters for controling rpart. See ?rpart::rpart.control for more information and defaults values (caution because, in FlowCT there are some changes: cp = 0 and minsplit = 10).

return.data

Original, pruned and used metadata should be returned?. Default = TRUE.

Examples

## Not run: 
tr <- rpart.tree(fcs.SCE = fcs, cell.clusters = "clusters_named", 
   time.var = "PFS", event.var = "PFS_c")

## End(Not run)

jgarces02/FlowCT documentation built on March 28, 2023, 12:42 p.m.