About this example
The R dataset airquality holds 153 daily readings from New York, May to September 1973 (Chambers et al. 1983). Ozone is missing on 37 days and solar radiation on 7, so each pair uses the days where both values exist: n ranges from 111 (ozone with solar radiation) to 153. The Month and Day columns are left out under Columns.
Ozone rises with temperature (ρ = 0.77) and falls with wind speed (ρ = −0.59). Spearman ρ is used because ozone is right-skewed. Five of the six pairs stay below 0.05 after the Holm adjustment over all six tests; solar radiation and wind do not correlate (ρ = −0.001).
Sources: R documentation: New York Air Quality Measurements (airquality)
The data
| Ozone | Solar.R | Wind | Temp | Month | Day |
|---|---|---|---|---|---|
| 41 | 190 | 7.4 | 67 | 5 | 1 |
| 36 | 118 | 8 | 72 | 5 | 2 |
| 12 | 149 | 12.6 | 74 | 5 | 3 |
| 18 | 313 | 11.5 | 62 | 5 | 4 |
| NA | NA | 14.3 | 56 | 5 | 5 |
| 28 | NA | 14.9 | 66 | 5 | 6 |
| 23 | 299 | 8.6 | 65 | 5 | 7 |
| 19 | 99 | 13.8 | 59 | 5 | 8 |
| 8 | 19 | 20.1 | 61 | 5 | 9 |
| NA | 194 | 8.6 | 69 | 5 | 10 |
| 7 | NA | 6.9 | 74 | 5 | 11 |
| 16 | 256 | 9.7 | 69 | 5 | 12 |
| 11 | 290 | 9.2 | 66 | 5 | 13 |
| 14 | 274 | 10.9 | 68 | 5 | 14 |
| 18 | 65 | 13.2 | 58 | 5 | 15 |
…and 138 more rows. Open the example to see all of them.
One row per observation. Correlations use the rows where both values are present (pairwise complete) and match R cor and cor.test. Open the example, replace the data with your own, and export the figure as SVG, PDF, PNG or TIFF.