cor.flex: Correlation matrix from data.frame

View source: R/corr.R

cor.flexR Documentation

Correlation matrix from data.frame

Description

Creates correlation matrix from data.frame based on Hmisc::rcorr

Usage

cor.flex(
  df,
  na = "listwise",
  type = "pearson",
  labs = "numbered",
  diag = "bottom",
  lang = "hr"
)

Arguments

df

data.frame

na

how will missing values be handled ("listwise" (default), "pairwise")

type

type of correlation ("pearson" (default), "spearman")

labs

type of table:

  • "numbered" - numbered variable labels an numbers as column headings

  • "asis" - variable labels in rows and column headings

  • "names" - variable names in rows and column headings

diag

table looks ("bottom" (default), "top", "all")

lang

language ("hr" (default), "en")

Value

list with two elements:

  • $matrix - flextable object

  • $N - number of participants (range if na="pairwise")


mrajter/rajter.flex documentation built on July 30, 2024, 1:31 a.m.