#' function for pheatmap
#' @description function for pheatmap
#' @export
generate_breaks = function(x, n, center = F){
if(center){
m = max(abs(c(min(x, na.rm = T), max(x, na.rm = T))))
res = seq(-m, m, length.out = n + 1)
}
else{
res = seq(min(x, na.rm = T), max(x, na.rm = T), length.out = n + 1)
}
return(res)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.