forked from saurfang/shinyCorrplot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.Rpres
45 lines (31 loc) · 1.69 KB
/
index.Rpres
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Correlation Matrix in Shiny with corrplot
========================================================
author: Forest
date: 9-18-2014
What is Correlation
========================================================
>In statistics, **dependence** is any statistical relationship between two random variables or two sets of data. **Correlation** refers to any of a broad class of statistical relationships involving dependence.
[Correlation](http://en.wikipedia.org/wiki/Correlation_and_dependence) is one of the most commonly used metrics to depict statistical relationships between two variables. It's often used in exploratory analysis, feature selection and many other modelling steps.
How to Visualize Correlation in R
========================================================
```{r}
pairs(mtcars)
```
***
`r library(corrplot)`
```{r}
corrplot(cor(mtcars))
```
Problems?
========================================================
- While the `pairs` function is very powerful when the data dimension is low, it's much more difficult to see things when you have a lot of variables.
- `corrplot` is an excellent function but it has so many arguments that mastering it could be overwhelming:
```{r}
str(corrplot)
```
Solution!
========================================================
https://saurfang.shinyapps.io/shinyCorrplot
This interactive Shiny application provides access to most exmaple use in `corrplot`'s excellent [vignette](http://cran.r-project.org/web/packages/corrplot/vignettes/corrplot-intro.html). It also lets you upload your own dataset, reorder the columns manually, and take a quick peak on the underlying dataset itself.
And, last but not least:
![Don't Forget] (http://imgs.xkcd.com/comics/correlation.png)