p.corr | R Documentation |
This function simplifies the call for Pearson's Product-Moment Correlation Coefficient (p.corr) on a given data frame.
p.corr(df, var1, var2)
df |
data frame to read in. |
var1 |
the dependent/outcome variable, |
var2 |
the main independent/predictor variable, |
This function returns the summary results table for a Pearson's correlation, examining the relationship between var1
from data frame df
, and var2
.
data <- mtcars
p.corr(data,mpg,wt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.