flow_breaks: Generate the breaks that makes sense for flow data...

Description Usage Arguments Value Examples

View source: R/flow_trans.R

Description

It is mainly used as helper function to construct breaks function used by 'trans_new'.

Usage

1
flow_breaks(x, n = 6, equal.space = FALSE, trans.fun, inverse.fun)

Arguments

x

the raw data values

n

desired number of breaks (the actual number will be different depending on the data range)

equal.space

whether breaks at equal-spaced intervals

trans.fun

the transform function (only needed when equal.space is TRUE)

inverse.fun

the inverse function (only needed when equal.space is TRUE)

Value

either 10^n intervals or equal-spaced(after transformed) intervals in raw scale.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(flowCore)
data(GvHD)
fr <- GvHD[[1]]
data.raw <- exprs(fr)[, "FL1-H"]
flow_breaks(data.raw)

trans <- logicleTransform()
inv <- inverseLogicleTransform(trans = trans)
myBrks <- flow_breaks(data.raw, equal.space = TRUE, trans = trans, inv = inv)
round(myBrks)
#to verify it is equally spaced at transformed scale
print(trans(myBrks))

flowWorkspace documentation built on Nov. 8, 2020, 8:08 p.m.