p.corr: Simplified Correlation

Description Usage Arguments Value Examples

View source: R/p.corr.R

Description

This function simplifies the call for Pearson's Product-Moment Correlation Coefficient (p.corr) on a given data frame.

Usage

1
p.corr(df, var1, var2)

Arguments

df

data frame to read in.

var1

the dependent/outcome variable, Y.

var2

the main independent/predictor variable, X.

Value

This function returns the summary results table for a Pearson's correlation, examining the relationship between var1 from data frame df, and var2.

Examples

1
2
3
data <- mtcars

p.corr(data,mpg,wt)

burrelvannjr/vannstats documentation built on April 30, 2021, 2:01 p.m.