#' @keywords internal
#'
calculate_max_correlation <- function(data, columns) {
x <- combn(columns, 2)
mx <- 0
for(i in 1:(x %>% ncol())) {
y1 <- data[, x[1,i]] %>% as.numeric()
y2 <- data[, x[2,i]] %>% as.numeric()
mx <- max(mx, cor(y1, y2, use = "p") %>% abs())
}
mx
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.