R/cor2.R

Defines functions cor2

Documented in cor2

#' Correlaciones pairwise
#'
#' @param data data frame
#' @param round redondear, por default 2 decimales (round, by default 2 digits)
#'
#' @return matriz de correlaciones (matrix correlations)
#' @export
#'
#' @examples
#' cor2(mtcars)

cor2 <- function(data, round = 2){
  round(cor(data, use = "pairwise.complete.obs"), round)
}
diegohc1/paquete2 documentation built on July 16, 2022, 11:43 a.m.