if (FALSE) {
x <- mtcars
x <- data.frame(x)
x$am <- factor(x$am)
x$vs <- factor(x$vs)
heatmaply(percentize(x))
x <- data.frame(a = 1:10, b = 11:20)
x[4:6, 1:2] <- NA
percentize(x)
percentize(x[, 1])
}
Run the code above in your browser using DataLab