flowjo_log_trans: flog transform function

Description Usage Arguments Value Examples

View source: R/flow_trans.R

Description

flog transform function constructor. It is different from flowCore version of logtGml2 in the way that it reset negative input so that no NAN will be returned.

Usage

1
2
3
4
5
6
7
flowjo_log_trans(
  decade = 4.5,
  offset = 1,
  scale = 1,
  n = 6,
  equal.space = FALSE
)

Arguments

decade

total number of decades (i.e. log(max)-log(min)

offset

offset to the orignal input(i.e. min value)

scale

the linear scale factor

n

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

equal.space

whether breaks at equal-spaced intervals

Value

flog(or its inverse) transform function

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
trans <- flowjo_log_trans()
data.raw <- c(1,1e2,1e3)
data.trans <- trans[["transform"]](data.raw)
data.trans

inverse.trans <- trans[["inverse"]]
inverse.trans(data.trans)

#negative input
data.raw <- c(-10,1e2,1e3)
data.trans <- trans[["transform"]](data.raw)
data.trans
inverse.trans(data.trans)#we lose the original value at lower end since flog can't restore negative value

#different
trans <- flowjo_log_trans(decade = 3, offset = 30)
data.trans <- trans[["transform"]](data.raw)
data.trans
inverse.trans <- trans[["inverse"]]
inverse.trans(data.trans)

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