From the course: R Essential Training Part 2: Modeling Data

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Computing correlations

Computing correlations

From the course: R Essential Training Part 2: Modeling Data

Start my 1-month free trial

Computing correlations

- [Instructor] Once you've explored your individual variables, it's time to start looking at associations, which is really the exciting part of what's going on. The most common way to do this is with correlations now. well, correlation coefficients are generally designed to be used with pairs of quantitative or scaled variables. They're more flexible than that. But let me show you the canonical example. To do this, I'm going to load a few packages, including the new one coreplot is one that I use for a visualization of correlation. So let's start by loading these packages. And then I'm going to come down and load the state data about Google search terms. And I'm going to save just a few of the search terms to be used as examples here. So I'm going to save that as a data frame. Let's take a look at the data down here at the bottom. And you can see we have Instagram, Facebook, retweets, so on and so forth through mortgage as…

Contents