cor() — Correlation

Shows how strongly two things move together, from −1 to +1.

cor(x, y)

Key idea

Definition

each pair of values
their means
the correlation, from -1 to +1

Where you'd use it

Frequently asked questions

What does cor measure?
The strength of a linear relationship, from −1 to +1. 0 means no linear link (a curve can still exist).
Does correlation prove causation?
No — a hidden third variable can drive both.