R/cor_matrix.R

Defines functions cor_matrix

Documented in cor_matrix

#' Correlation Matrix
#'
#' Quick function for formatted correlation matrix that can be saved as a data frame
#' @param x data frame
#' @export


cor_matrix <- function(x){

  data <- x %>% dplyr::select(where(is.numeric))
  round(cor(data, use= "complete.obs"), 2) %>% as.data.frame()
}
ReverieNB/FMT-Package documentation built on March 10, 2023, 1:31 p.m.