cor() returns the Pearson correlation between two vectors, ranging from -1 to 1. Values near 1 mean the variables move together, near -1 they move oppositely, and near 0 there is no linear relationship. Correlation does not imply causation, so interpret with care. Pass a data frame with several numeric columns to cor() for a full correlation matrix.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.