manual_classification: Manual classification object.

Description Usage Arguments Value Examples

View source: R/manual_classification.R

Description

An S3 class for handling manual classification.

Usage

1
2
3
4
5
manual_classification(
  assignments = factor(),
  cutoff = NA_real_,
  transform = identity
)

Arguments

assignments

A factor vector of cluster assignments.

cutoff

The value used for the manual classification.

transform

A callable (function) to transform the data before applying the cutoff classification.

Value

A manual classification that behaves like a factor.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# An empty classification.
manual_classification()

# The numeric assignments will be turned into a factor.
manual_classification(c(1, 2, 1, 2, 1, 1), cutoff = 4000)

# Provide a different function used to transform the data before
# applying the cutoff.
manual_classification(
  c("a", "a", "b", "a", "b"),
  cutoff = 2.5,
  transform = log10
)

Kevin-Haigis-Lab/PackageBluishgreen documentation built on March 7, 2021, 1:24 a.m.