cor_to_df: Convert correlation matrix into a tidy data frame

View source: R/cor_to_df.R

cor_to_dfR Documentation

Convert correlation matrix into a tidy data frame

Description

This function assumes that the input into cor() uses variable names, and available variable labels are not used. If either of the label_table or id arguments are unused, cor_to_df simply returns a tibble without label matching. Use the label_table and id arguments to match up variable names with the variable labels.

Usage

cor_to_df(cor_m, label_table = NULL, id = NULL)

Arguments

cor_m

Correlation matrix in the form of an output from cor().

label_table

A two-column table with one column used for matching and the other for returning labels.

id

A character vector specifying the name of the matching / id column in the label_table.


martinctc/surveytools documentation built on Nov. 21, 2024, 10:48 p.m.