table.n {bioimagetools} | R Documentation |
Cross Tabulation and Table Creation (including empty classes)
Description
Cross Tabulation and Table Creation (including empty classes)
Usage
table.n(
x,
m = max(x, na.rm = TRUE),
percentage = FALSE,
weight = NULL,
parallel = FALSE
)
Arguments
x |
R object with classes |
m |
maximum number of classes |
percentage |
boolean. If TRUE result is in percentages. |
weight |
weight for each voxel |
parallel |
Logical. Can we use parallel computing? |
Value
vector with (weighted) counts (including empty classes)
Author(s)
Volker Schmid 2013-2016
Examples
x <- c(1,1,2,2,4,4,4)
table.n(x)
# [1] 2 2 0 3
table.n(x, m=5)
# [1] 2 2 0 3 0
table.n(x, weight=c(1,1,1,2,.5,.5,.5))
# [1] 2.0 3.0 0.0 1.5
[Package bioimagetools version 1.1.8 Index]