Description Usage Arguments Value Examples
View source: R/data_preparation_functions.R
booleanize
returns an other version of the input data.frame with
simple, definable present-absent information instead of numeric values.
Absent means zero.
1 | booleanize(x, present = TRUE, absent = FALSE)
|
x |
matrix or data.frame. Table with only numeric values. |
present |
any atomic type. Replacement values for cells with numeric value >0. default: TRUE |
absent |
any atomic type. Replacement values for cells with numeric value 0. default: FALSE |
A matrix or data.frame with present-absent values.
1 2 3 4 | testmatrix <- data.frame(c1 = c(0,2,0,8), c2 = c(5,6,7,0), c3 = c(5,6,7,0))
booleanize(testmatrix)
booleanize(x = testmatrix, present = "cake", absent = "no cake")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.