View source: R/variable_summaries.R
summarize_relationship | R Documentation |
Compute statistics, such as a correlation coefficient, summarizing the relationship between two variables.
summarize_relationship(data, formula, FUN = cor, ...)
summarise_relationship(data, formula, FUN = cor, ...)
data |
a data frame containing the variables appearing in
|
formula |
an object of class " |
FUN |
a function taking at least two arguments, in which the first two arguments are the two variables to be related. Should return a scalar. |
... |
additional parameters to pass to FUN. |
The formula is used to specify the response, the predictor variable and
optionally a grouping variable which is specified in the form
Response ~ Predictor + Group
.
data.frame containing the statistics of interest
summarize_relationship(mpg ~ hp, data = mtcars, cor)
summarize_relationship(mpg ~ hp, data = mtcars, cor, method = "spearman")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.