iter_cor: Iteration of correlation analyses with a specific variable

View source: R/iter_cor.R

iter_corR Documentation

Iteration of correlation analyses with a specific variable

Description

This function perform multiple correlation analyses between a specific variable and various continuous variables

Usage

iter_cor(data, varlist, var, method = "pearson", print.result = F, p.round = 3)

Arguments

data

a dataframe to be used

varlist

a vector of continuous variables

var

a variable of interest

method

a character string indicating which correlation coefficient is to be used for the test. One of "pearson", "kendall", or "spearman", can be abbreviated.

print.result

a logical indicating whether to show significant variables

p.round

a specified number of decimal places to which rounds the values

Value

Dataframe containing the result of correlation analyes


nephroj/medutils documentation built on Feb. 3, 2024, 8:33 a.m.