diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 0000000..2d19fc7 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml new file mode 100644 index 0000000..c9f0165 --- /dev/null +++ b/.github/workflows/pkgdown.yaml @@ -0,0 +1,50 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + release: + types: [published] + workflow_dispatch: + +name: pkgdown + +permissions: read-all + +jobs: + pkgdown: + runs-on: ubuntu-latest + # Only restrict concurrency for non-PR jobs + concurrency: + group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::pkgdown, local::. + needs: website + + - name: Build site + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) + shell: Rscript {0} + + - name: Deploy to GitHub pages πŸš€ + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4.5.0 + with: + clean: false + branch: gh-pages + folder: docs diff --git a/.gitignore b/.gitignore index 971c55d..1222d61 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ vignettes/*.tex tests/testthat/Rplots.pdf revdep pkgdown +docs diff --git a/DESCRIPTION b/DESCRIPTION index 2df6767..9a96430 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,12 +1,18 @@ +Type: Package Package: corrgram Title: Plot a Correlogram Version: 1.14 -Authors@R: person("Kevin","Wright", email="kw.stat@gmail.com", comment=c(ORCID = "0000-0002-0617-8673"), role=c("aut","cre","cph")) Date: 2021-04-29 -Type: Package +Authors@R: + person("Kevin", "Wright", , "kw.stat@gmail.com", role = c("aut", "cre", "cph"), + comment = c(ORCID = "0000-0002-0617-8673")) Description: Calculates correlation of variables and displays the results - graphically. Included panel functions can display points, shading, ellipses, and - correlation values with confidence intervals. See Friendly (2002) . + graphically. Included panel functions can display points, shading, + ellipses, and correlation values with confidence intervals. See + Friendly (2002) . +License: MIT + file LICENSE +URL: https://kwstat.github.io/corrgram/, http://kwstat.github.io/corrgram/ +BugReports: https://github.com/kwstat/corrgram/issues/ Imports: graphics, grDevices, @@ -20,11 +26,8 @@ Suggests: seriation, sfsmisc, testthat -License: MIT + file LICENSE -LazyData: true ->>>>>>> Stashed changes +VignetteBuilder: + knitr Encoding: UTF-8 -URL: https://kwstat.github.io/corrgram/ -BugReports: https://github.com/kwstat/corrgram/issues/ -VignetteBuilder: knitr -RoxygenNote: 7.2.3 +LazyData: true +RoxygenNote: 7.3.2 diff --git a/NEWS.md b/NEWS.md index a53b7a9..6d5f2d6 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,14 +1,16 @@ -# corrgram 1.15 - unpublished +# corrgram 1.15 unpublished * Switch to MIT license -# corrgram 1.14 - Apr 2021 + +# corrgram 1.14 (2021-04-01) * The `seriation` package is moved from Imports to Suggests. This makes `corrgram` lighter loading for most people. (Requested by P.Kiener and others) * The `outer.labels` argument has improved default values. -# corrgram 1.13 - Jul 2018 + +# corrgram 1.13 (2018-07-09) * Test coverage at 95% using `covr` package. @@ -18,7 +20,8 @@ * `panel.conf` now only allows `cor.method="pearson"` (which is the default.) Fix issue #13. -# corrgram 1.12 - May 2017 + +# corrgram 1.12 (2017-05-07) * New vignette about an invalid correlation matrix. @@ -26,11 +29,13 @@ * Added package logo on github. -# corrgram 1.11 - Apr 2017 + +# corrgram 1.11 (2017-04-03) * New argument `outer.labels` for adding labels along outside edges of corrgram. (Request of Vanessa Bruat and others.) -# corrgram 1.10 - Nov 2016 + +# corrgram 1.10 (2016-11-09) * Function `corrgram()` now returns the correlation matrix. @@ -38,7 +43,8 @@ * Began using `testthat` package. -# corrgram 1.9 - Jul 2016 + +# corrgram 1.9 (2016-07-16) * New panel function `panel.cor` for colored correlation values. @@ -46,15 +52,18 @@ * Added more cases to tests directory. -# corrgram 1.8 - Jul 2015 + +# corrgram 1.8 (2015-07-03) * Namespace changes due to R devel changes. -# corrgram 1.7 - Feb 2015 + +# corrgram 1.7 (2015-02-13) * Added more seriate options. -# corrgram 1.6 - Aug 2014 + +# corrgram 1.6 (2014-08-29) * Moved packages from Depends to Imports. @@ -62,25 +71,29 @@ * New argument `cor.method`. (Request of Evan Williams). -# corrgram 1.5 - Aug 2013 + +# corrgram 1.5 (2013-08-29) * Updated references links. (Request of Michael Friendly). * Fixed small bug with test for correlation matrix. (Reported by F. Rosa) -# corrgram 1.4 - Nov 2012 + +# corrgram 1.4 (2012-11-07) * New argument `col.regions` to specify panel colors. * Re-worked examples section for more variety. -# corrgram 1.3 - Aug 2012 + +# corrgram 1.3 (2012-08-15) * New panel function `panel.bar`. (Request of dadrivr) * Added example for unclipped labels (in the test suite). -# corrgram 1.2 - Mar 2012 + +# corrgram 1.2 (2012-03-28) * Small bug. Now accepts NA values in correlation matrices, and NAs caused by missing combinations of data and cor(use="pair"). @@ -90,11 +103,13 @@ * Test suite now includes corrgram of inverse correlation, partial correlation matrices. -# corrgram 1.1 - Oct 2011 + +# corrgram 1.1 (2011-10-20) * Added namespace. -# corrgram 1.0 - Jul 2011 + +# corrgram 1.0 (2011-07-02) * New panel function `panel.conf`. @@ -108,10 +123,12 @@ * Ordering can now be done on absolute value of correlations. -# corrgram 0.1 - Dec 2006 + +# corrgram 0.1 (2006-12-01) * First release to CRAN. -# corrgram 0.0 - Apr 2006 + +# corrgram 0.0 (2006-04-01) * Package development begins. diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 0000000..63d6c04 --- /dev/null +++ b/_pkgdown.yml @@ -0,0 +1,4 @@ +url: http://kwstat.github.io/corrgram/ +template: + bootstrap: 5 + diff --git a/docs/404.html b/docs/404.html deleted file mode 100644 index 2a52f2a..0000000 --- a/docs/404.html +++ /dev/null @@ -1,157 +0,0 @@ - - - - - - - - -Page not found (404) β€’ corrgram - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
-
- - -Content not found. Please use links in the navbar. - -
- -
- - - -
- - -
-

Site built with pkgdown 1.4.0.

-
- -
-
- - - - - - - - diff --git a/docs/apple-touch-icon-120x120.png b/docs/apple-touch-icon-120x120.png deleted file mode 100644 index d078c46..0000000 Binary files a/docs/apple-touch-icon-120x120.png and /dev/null differ diff --git a/docs/apple-touch-icon-152x152.png b/docs/apple-touch-icon-152x152.png deleted file mode 100644 index e490ac3..0000000 Binary files a/docs/apple-touch-icon-152x152.png and /dev/null differ diff --git a/docs/apple-touch-icon-60x60.png b/docs/apple-touch-icon-60x60.png deleted file mode 100644 index 0b25b25..0000000 Binary files a/docs/apple-touch-icon-60x60.png and /dev/null differ diff --git a/docs/apple-touch-icon-76x76.png b/docs/apple-touch-icon-76x76.png deleted file mode 100644 index 83be3d2..0000000 Binary files a/docs/apple-touch-icon-76x76.png and /dev/null differ diff --git a/docs/apple-touch-icon.png b/docs/apple-touch-icon.png deleted file mode 100644 index e490ac3..0000000 Binary files a/docs/apple-touch-icon.png and /dev/null differ diff --git a/docs/articles/corrgram_cov2cor.html b/docs/articles/corrgram_cov2cor.html deleted file mode 100644 index 338f6f0..0000000 --- a/docs/articles/corrgram_cov2cor.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - -Finding the nearest proper correlation matrix β€’ corrgram - - - - - - - - - - - - - - - - - -
-
- - - - -
-
- - - - -

Consider the following matrix, as might arise from calculating covariance based on pairwise-complete data.

- -
##         [,1]    [,2]   [,3]   [,4]   [,5]   [,6]    [,7]
-## [1,] 100.511 159.266  3.888 59.964 37.231 32.944  68.845
-## [2,] 159.266 277.723  6.161 95.017 58.995 52.203 109.090
-## [3,]   3.888   6.161 99.831  2.320  1.440  1.274   2.663
-## [4,]  59.964  95.017  2.320 35.774 22.212 19.655  41.073
-## [5,]  37.231  58.995  1.440 22.212 40.432 12.203  25.502
-## [6,]  32.944  52.203  1.274 19.655 12.203 10.798  22.566
-## [7,]  68.845 109.090  2.663 41.073 25.502 22.566  96.217
-

This is not a proper covariance matrix (it has a negative eigenvalue).

-
eigen(vv)$values
-
## [1]  4.808047e+02  9.965048e+01  4.595154e+01  2.657509e+01  8.304329e+00
-## [6]  6.685001e-04 -8.147905e-04
-

If we attempt to use the cov2cor() function to convert the covariance matrix to a correlation matrix, we find the largest correlation values are slightly larger than 1.0.

-
cc <- cov2cor(vv)
-max(cc) # 1.000041
-
## [1] 1.000041
-

If this is passed to the corrgram function, it will issue a warning that the input data is not a correlation matrix and then calculate pairwise correlations of the columns, resulting in a non-sensical graph.

-

There are several packages with functions that can be used to force the correlation matrix to be an actual, positive-definite correlation matrix. Two are given here.

-
-

-psych

-
require(psych)
-
## Loading required package: psych
- -
## Warning in psych::cor.smooth(cc): Matrix was not positive definite,
-## smoothing was done
-
max(cc2)
-
## [1] 1
-
-
-

-sfsmisc

- -
## [1] TRUE
-
identical(cc, t(cc)) # FALSE
-
## [1] FALSE
- -
## [1] 1
-

After converting the matrix to a valid correlation matrix, an accurate corrgram can be created:

-
require(corrgram)
-
## Loading required package: corrgram
-
corrgram(cc2, lower=panel.cor)
-

-
-
- - - -
- - - -
- -
-

Site built with pkgdown 1.4.0.

-
- -
-
- - - - - - diff --git a/docs/articles/corrgram_cov2cor_files/figure-html/unnamed-chunk-6-1.png b/docs/articles/corrgram_cov2cor_files/figure-html/unnamed-chunk-6-1.png deleted file mode 100644 index a369d44..0000000 Binary files a/docs/articles/corrgram_cov2cor_files/figure-html/unnamed-chunk-6-1.png and /dev/null differ diff --git a/docs/articles/corrgram_examples.html b/docs/articles/corrgram_examples.html deleted file mode 100644 index 7578ecc..0000000 --- a/docs/articles/corrgram_examples.html +++ /dev/null @@ -1,393 +0,0 @@ - - - - - - - -Examples for the corrgram package β€’ corrgram - - - - - - - - - - - - - - - - - -
-
- - - - -
-
- - - - -
-

-Abstract

-

The corrgram package is an implementation of correlograms. This vignette reproduces most of the figures in Friendly (2002).

-
-
-

-Setup

- -

The data are 11 measures of performance and salary for 263 baseball players in the 1986 baseball season in the United States. The data were used in 1988 Data Expo at the Joint Statistical Meetings.

-

The first 6 rows of the data and the upper-left corner of the correlation matrix are given below.

-
library("corrgram")
-head(baseball)
-
##             Name League Team Position Atbat Hits Homer Runs RBI Walks Years Atbatc Hitsc
-## 1 Andy Allanson       A  CLE       C    293   66     1   30  29    14     1    293    66
-## 2 Alan Ashby          N  HOU       C    315   81     7   24  38    39    14   3449   835
-## 3 Alvin Davis         A  SEA       1B   479  130    18   66  72    76     3   1624   457
-## 4 Andre Dawson        N  MON       OF   496  141    20   65  78    37    11   5628  1575
-## 5 A Galarraga         N  MON       1B   321   87    10   39  42    30     2    396   101
-## 6 A Griffin           A  OAK       SS   594  169     4   74  51    35    11   4408  1133
-##   Homerc Runsc RBIc Walksc Putouts Assists Errors Salary   logSal
-## 1      1    30   29     14     446      33     20     NA       NA
-## 2     69   321  414    375     632      43     10    475 2.676694
-## 3     63   224  266    263     880      82     14    480 2.681241
-## 4    225   828  838    354     200      11      3    500 2.698970
-## 5     12    48   46     33     805      40      4     92 1.963788
-## 6     19   501  336    194     282     421     25    750 2.875061
-
round(cor(baseball[, 5:14], use="pair"),2)
-
##        Atbat Hits Homer Runs  RBI Walks Years Atbatc Hitsc Homerc
-## Atbat   1.00 0.97  0.59 0.91 0.82  0.67  0.05   0.24  0.25   0.24
-## Hits    0.97 1.00  0.56 0.92 0.81  0.64  0.04   0.23  0.26   0.20
-## Homer   0.59 0.56  1.00 0.65 0.86  0.48  0.12   0.22  0.22   0.49
-## Runs    0.91 0.92  0.65 1.00 0.80  0.73  0.00   0.19  0.20   0.23
-## RBI     0.82 0.81  0.86 0.80 1.00  0.62  0.15   0.29  0.31   0.44
-## Walks   0.67 0.64  0.48 0.73 0.62  1.00  0.14   0.28  0.28   0.33
-## Years   0.05 0.04  0.12 0.00 0.15  0.14  1.00   0.92  0.90   0.73
-## Atbatc  0.24 0.23  0.22 0.19 0.29  0.28  0.92   1.00  1.00   0.80
-## Hitsc   0.25 0.26  0.22 0.20 0.31  0.28  0.90   1.00  1.00   0.78
-## Homerc  0.24 0.20  0.49 0.23 0.44  0.33  0.73   0.80  0.78   1.00
-
-
-

-Figure 2

-

Figure 2 shows two ways to graphically display the correlation matrix using the panel.shade() and panel.pie() functions.

- -

-
-
-

-Figure 3

-

Figure 3 shows an eigenvector plot of the correlation matrix. This forms the basis of the orderings of the variables in the corrgram in Figure 4b in the next section, beginning with β€œAtBat” and then moving counter-clockwise up to β€œYears”. Note: Eigenvectors are unique only up to a change of sign.

-
baseball.cor <- cor(baseball[,vars2], use='pair')
-baseball.eig <- eigen(baseball.cor)$vectors[,1:2]
-e1 <- baseball.eig[,1]
-e2 <- baseball.eig[,2]
-plot(e1,e2,col='white', xlim=range(e1,e2), ylim=range(e1,e2))
-text(e1,e2, rownames(baseball.cor), cex=1)
-title("Eigenvector plot of baseball data")
-arrows(0, 0, e1, e2, cex=0.5, col="red", length=0.1)
-

-
-
-

-Figure 4a, 4b

-

In figure 4a the variables are sorted in the alphabetical order as given in the data.

-

In figure 4b, the variables are sorted according to the principal component ordering in Figure 3 to look for possible clustering of the variables. It is not surprising to see that more times at bat is strongly correlated with a higher number of hits and a higher number of runs.

-
corrgram(baseball[,vars2], main="Baseball data (alphabetic order)")
-

- -

-
-
-

-Figure 5

-

Figure 5 shows a corrgram for all numeric variables in the dataframe. Non-numeric columns in the data are ignored.

-
corrgram(baseball, order=TRUE, main="Baseball data (PC order)")
-

-
-
-

-Figure 6.

-

Figure 6 shows a corrgram of automotive data on 74 different models of cars from 1979. There are two obvious groups of variables

-

Note, the arrangement is slightly different from Friendly.

-
corrgram(auto, order=TRUE, main="Auto data (PC order)")
-

-
-
-

-Figure 7.

-

The inverse of the correlation matrix expresses conditional dependence and independence of the variables.

-

The variables are sorted in the same order as in figure 4. One example interpretation is: controlling for all other variables, there is still a large correlation between Years and log Salary.

-
rinv <- function(r){
-  # r is a correlation matrix
-  # calculate r inverse and scale to correlation matrix
-  # Derived from Michael Friendly's SAS code
-
-  ri <- solve(r)
-  s <- diag(ri)
-  s <- diag(sqrt(1/s))
-  ri <- s %*% ri %*% s
-  n <- nrow(ri)
-  ri <- ri * (2*rep(1,n) - matrix(1, n, n))
-  diag(ri) <- 1  # Should already be 1, but could be 1 + epsilon
-  colnames(ri) <- rownames(ri) <- rownames(r)
-  return(ri)
-}
-
-vars7 <- c("Years", "logSal", "Homer", "Putouts", "RBI", "Walks",
-           "Runs", "Hits", "Atbat", "Errors", "Assists")
-cb <- cor(baseball[,vars7], use="pair")
-corrgram(-rinv(cb), main=expression(paste("Baseball data ", R^-1)))
-

-
-
-

-Figure 8

-

Figure 8 shows a partial independence corrgram for the automotive data, when Price and MPG are partialed out.

-
require(Matrix) # For block diagonal function
-
## Loading required package: Matrix
-
partial <- function(r, xvar){
-  # r is a correlation matrix
-  # Calculate partial correlation of y|x
-  yvar <- setdiff(colnames(r), xvar)
-  ri <- r[yvar,yvar] - r[yvar,xvar] %*% solve(r[xvar,xvar]) %*% r[xvar,yvar]
-  s <- diag(ri)
-  s <- diag(sqrt(1/s))
-  ri <- s %*% ri %*% s
-  ri <- as.matrix(Matrix::bdiag(ri, r[xvar, xvar]))
-  diag(ri) <- 1  # Should already be 1, but could be 1 + epsilon
-  colnames(ri) <- rownames(ri) <- c(yvar, xvar)
-  return(ri)
-}
-
-vars8a <- c("Gratio", "Rep78", "Rep77", "Hroom", "Trunk", "Rseat",
-            "Length", "Weight", "Displa", "Turn")
-vars8b <- c("MPG", "Price")
-vars8 <- c(vars8a, vars8b)
-auto.cor <- cor(auto[, vars8], use="pair")
-auto.par <- partial(auto.cor, vars8b)
-corrgram(auto.par,
-         lower.panel=panel.pie, upper.panel=panel.pie,
-         main="Auto data, partialing out Price,MPG")
-

-
-
-

-Figure 11

-

Figure 11 provides another way to display the data, using both ellipses and loess lines. Long, narrow ellipses represent high correlations while circular ellipses represent low correlations.

- -

-
-
-

-Further examples

-

Demonstrate density panel, correlation confidence panel

- -

-

Demonstrate panel.bar, panel.ellipse, panel.minmax, col.regions

- -

-
-

-Correlation matrix

-

The vote data is a matrix.

- -

-
-
-

-Ratings data

-

An example showing one way to plot ratings data.

-
load(url("https://github.com/alexanderrobitzsch/sirt/blob/master/data/data.ratings3.rda?raw=true"))
-
-# jitter first, so the upper/lower panels are symmetric
-data.ratings3 <- transform(data.ratings3,
-                           c2=jitter(crit2), c3=jitter(crit3),
-                           c4=jitter(crit4), c6=jitter(crit6))
-                           
-library(corrgram)
-panel.raters <- function (x, y, corr = NULL, col.regions, cor.method, ...) {
-  if (!is.null(corr)) 
-    return()
-  plot.xy(xy.coords(x, y), type = "p", ...)
-  abline(lm(y ~ x))
-  box(col = "lightgray")
-}
-corrgram(data.ratings3[,7:10], diag=panel.density, lower.panel=panel.raters, upper.panel=panel.conf)
-

- -
## R version 3.6.1 (2019-07-05)
-## Platform: x86_64-w64-mingw32/x64 (64-bit)
-## Running under: Windows 7 x64 (build 7601) Service Pack 1
-## 
-## Matrix products: default
-## 
-## locale:
-## [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
-## [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
-## [5] LC_TIME=English_United States.1252    
-## 
-## attached base packages:
-## [1] stats     graphics  grDevices utils     datasets  methods   base     
-## 
-## other attached packages:
-## [1] Matrix_1.2-17 corrgram_1.14 knitr_1.24   
-## 
-## loaded via a namespace (and not attached):
-##  [1] Rcpp_1.0.2       lattice_0.20-38  rprojroot_1.3-2  crayon_1.3.4     digest_0.6.20   
-##  [6] assertthat_0.2.1 MASS_7.3-51.4    grid_3.6.1       R6_2.4.0         backports_1.1.4 
-## [11] magrittr_1.5     evaluate_0.14    stringi_1.4.3    rlang_0.4.0      fs_1.3.1        
-## [16] rmarkdown_1.15   pkgdown_1.4.0    desc_1.2.0       tools_3.6.1      stringr_1.4.0   
-## [21] yaml_2.2.0       xfun_0.9         compiler_3.6.1   memoise_1.1.0    htmltools_0.3.6
-
-
-

-References

-
-
-

Friendly, Michael. 2002. β€œCorrgrams: Exploratory Displays for Correlation Matrices.” The American Statistician 56: 316–24. https://doi.org/10.1198/000313002533.

-
-
-
-
-
- - - -
- - - -
- -
-

Site built with pkgdown 1.4.0.

-
- -
-
- - - - - - diff --git a/docs/articles/corrgram_examples_files/figure-html/ellipse-1.png b/docs/articles/corrgram_examples_files/figure-html/ellipse-1.png deleted file mode 100644 index d4f21c0..0000000 Binary files a/docs/articles/corrgram_examples_files/figure-html/ellipse-1.png and /dev/null differ diff --git a/docs/articles/corrgram_examples_files/figure-html/fig2-1.png b/docs/articles/corrgram_examples_files/figure-html/fig2-1.png deleted file mode 100644 index 729e4f1..0000000 Binary files a/docs/articles/corrgram_examples_files/figure-html/fig2-1.png and /dev/null differ diff --git a/docs/articles/corrgram_examples_files/figure-html/fig3-1.png b/docs/articles/corrgram_examples_files/figure-html/fig3-1.png deleted file mode 100644 index 25926c6..0000000 Binary files a/docs/articles/corrgram_examples_files/figure-html/fig3-1.png and /dev/null differ diff --git a/docs/articles/corrgram_examples_files/figure-html/fig4-1.png b/docs/articles/corrgram_examples_files/figure-html/fig4-1.png deleted file mode 100644 index c224d33..0000000 Binary files a/docs/articles/corrgram_examples_files/figure-html/fig4-1.png and /dev/null differ diff --git a/docs/articles/corrgram_examples_files/figure-html/fig4-2.png b/docs/articles/corrgram_examples_files/figure-html/fig4-2.png deleted file mode 100644 index ce5eaf8..0000000 Binary files a/docs/articles/corrgram_examples_files/figure-html/fig4-2.png and /dev/null differ diff --git a/docs/articles/corrgram_examples_files/figure-html/fig5-1.png b/docs/articles/corrgram_examples_files/figure-html/fig5-1.png deleted file mode 100644 index 45578a7..0000000 Binary files a/docs/articles/corrgram_examples_files/figure-html/fig5-1.png and /dev/null differ diff --git a/docs/articles/corrgram_examples_files/figure-html/fig6-1.png b/docs/articles/corrgram_examples_files/figure-html/fig6-1.png deleted file mode 100644 index f8687a3..0000000 Binary files a/docs/articles/corrgram_examples_files/figure-html/fig6-1.png and /dev/null differ diff --git a/docs/articles/corrgram_examples_files/figure-html/fig7-1.png b/docs/articles/corrgram_examples_files/figure-html/fig7-1.png deleted file mode 100644 index 53d6555..0000000 Binary files a/docs/articles/corrgram_examples_files/figure-html/fig7-1.png and /dev/null differ diff --git a/docs/articles/corrgram_examples_files/figure-html/fig8-1.png b/docs/articles/corrgram_examples_files/figure-html/fig8-1.png deleted file mode 100644 index 4be29cf..0000000 Binary files a/docs/articles/corrgram_examples_files/figure-html/fig8-1.png and /dev/null differ diff --git a/docs/articles/corrgram_examples_files/figure-html/panelbar-1.png b/docs/articles/corrgram_examples_files/figure-html/panelbar-1.png deleted file mode 100644 index f047ff5..0000000 Binary files a/docs/articles/corrgram_examples_files/figure-html/panelbar-1.png and /dev/null differ diff --git a/docs/articles/corrgram_examples_files/figure-html/scatter-1.png b/docs/articles/corrgram_examples_files/figure-html/scatter-1.png deleted file mode 100644 index 4ae72a7..0000000 Binary files a/docs/articles/corrgram_examples_files/figure-html/scatter-1.png and /dev/null differ diff --git a/docs/articles/corrgram_examples_files/figure-html/unnamed-chunk-1-1.png b/docs/articles/corrgram_examples_files/figure-html/unnamed-chunk-1-1.png deleted file mode 100644 index 1031ca6..0000000 Binary files a/docs/articles/corrgram_examples_files/figure-html/unnamed-chunk-1-1.png and /dev/null differ diff --git a/docs/articles/corrgram_examples_files/figure-html/vote-1.png b/docs/articles/corrgram_examples_files/figure-html/vote-1.png deleted file mode 100644 index 622d0de..0000000 Binary files a/docs/articles/corrgram_examples_files/figure-html/vote-1.png and /dev/null differ diff --git a/docs/articles/index.html b/docs/articles/index.html deleted file mode 100644 index 0408b59..0000000 --- a/docs/articles/index.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - -Articles β€’ corrgram - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
-
- - - -
-
- - -
- - -
-

Site built with pkgdown 1.4.0.

-
- -
-
- - - - - - - - diff --git a/docs/authors.html b/docs/authors.html deleted file mode 100644 index 10e338b..0000000 --- a/docs/authors.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - -Authors β€’ corrgram - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
-
- - -
    -
  • -

    Kevin Wright. Author, maintainer. ORCID -

    -
  • -
- -
- -
- - - -
- - -
-

Site built with pkgdown 1.4.0.

-
- -
-
- - - - - - - - diff --git a/docs/docsearch.css b/docs/docsearch.css deleted file mode 100644 index e5f1fe1..0000000 --- a/docs/docsearch.css +++ /dev/null @@ -1,148 +0,0 @@ -/* Docsearch -------------------------------------------------------------- */ -/* - Source: https://github.com/algolia/docsearch/ - License: MIT -*/ - -.algolia-autocomplete { - display: block; - -webkit-box-flex: 1; - -ms-flex: 1; - flex: 1 -} - -.algolia-autocomplete .ds-dropdown-menu { - width: 100%; - min-width: none; - max-width: none; - padding: .75rem 0; - background-color: #fff; - background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, .1); - box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .175); -} - -@media (min-width:768px) { - .algolia-autocomplete .ds-dropdown-menu { - width: 175% - } -} - -.algolia-autocomplete .ds-dropdown-menu::before { - display: none -} - -.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-] { - padding: 0; - background-color: rgb(255,255,255); - border: 0; - max-height: 80vh; -} - -.algolia-autocomplete .ds-dropdown-menu .ds-suggestions { - margin-top: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion { - padding: 0; - overflow: visible -} - -.algolia-autocomplete .algolia-docsearch-suggestion--category-header { - padding: .125rem 1rem; - margin-top: 0; - font-size: 1.3em; - font-weight: 500; - color: #00008B; - border-bottom: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--wrapper { - float: none; - padding-top: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column { - float: none; - width: auto; - padding: 0; - text-align: left -} - -.algolia-autocomplete .algolia-docsearch-suggestion--content { - float: none; - width: auto; - padding: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--content::before { - display: none -} - -.algolia-autocomplete .ds-suggestion:not(:first-child) .algolia-docsearch-suggestion--category-header { - padding-top: .75rem; - margin-top: .75rem; - border-top: 1px solid rgba(0, 0, 0, .1) -} - -.algolia-autocomplete .ds-suggestion .algolia-docsearch-suggestion--subcategory-column { - display: block; - padding: .1rem 1rem; - margin-bottom: 0.1; - font-size: 1.0em; - font-weight: 400 - /* display: none */ -} - -.algolia-autocomplete .algolia-docsearch-suggestion--title { - display: block; - padding: .25rem 1rem; - margin-bottom: 0; - font-size: 0.9em; - font-weight: 400 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--text { - padding: 0 1rem .5rem; - margin-top: -.25rem; - font-size: 0.8em; - font-weight: 400; - line-height: 1.25 -} - -.algolia-autocomplete .algolia-docsearch-footer { - width: 110px; - height: 20px; - z-index: 3; - margin-top: 10.66667px; - float: right; - font-size: 0; - line-height: 0; -} - -.algolia-autocomplete .algolia-docsearch-footer--logo { - background-image: url("data:image/svg+xml;utf8,"); - background-repeat: no-repeat; - background-position: 50%; - background-size: 100%; - overflow: hidden; - text-indent: -9000px; - width: 100%; - height: 100%; - display: block; - transform: translate(-8px); -} - -.algolia-autocomplete .algolia-docsearch-suggestion--highlight { - color: #FF8C00; - background: rgba(232, 189, 54, 0.1) -} - - -.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight { - box-shadow: inset 0 -2px 0 0 rgba(105, 105, 105, .5) -} - -.algolia-autocomplete .ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content { - background-color: rgba(192, 192, 192, .15) -} diff --git a/docs/docsearch.js b/docs/docsearch.js deleted file mode 100644 index b35504c..0000000 --- a/docs/docsearch.js +++ /dev/null @@ -1,85 +0,0 @@ -$(function() { - - // register a handler to move the focus to the search bar - // upon pressing shift + "/" (i.e. "?") - $(document).on('keydown', function(e) { - if (e.shiftKey && e.keyCode == 191) { - e.preventDefault(); - $("#search-input").focus(); - } - }); - - $(document).ready(function() { - // do keyword highlighting - /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */ - var mark = function() { - - var referrer = document.URL ; - var paramKey = "q" ; - - if (referrer.indexOf("?") !== -1) { - var qs = referrer.substr(referrer.indexOf('?') + 1); - var qs_noanchor = qs.split('#')[0]; - var qsa = qs_noanchor.split('&'); - var keyword = ""; - - for (var i = 0; i < qsa.length; i++) { - var currentParam = qsa[i].split('='); - - if (currentParam.length !== 2) { - continue; - } - - if (currentParam[0] == paramKey) { - keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20")); - } - } - - if (keyword !== "") { - $(".contents").unmark({ - done: function() { - $(".contents").mark(keyword); - } - }); - } - } - }; - - mark(); - }); -}); - -/* Search term highlighting ------------------------------*/ - -function matchedWords(hit) { - var words = []; - - var hierarchy = hit._highlightResult.hierarchy; - // loop to fetch from lvl0, lvl1, etc. - for (var idx in hierarchy) { - words = words.concat(hierarchy[idx].matchedWords); - } - - var content = hit._highlightResult.content; - if (content) { - words = words.concat(content.matchedWords); - } - - // return unique words - var words_uniq = [...new Set(words)]; - return words_uniq; -} - -function updateHitURL(hit) { - - var words = matchedWords(hit); - var url = ""; - - if (hit.anchor) { - url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor; - } else { - url = hit.url + '?q=' + escape(words.join(" ")); - } - - return url; -} diff --git a/docs/favicon-16x16.png b/docs/favicon-16x16.png deleted file mode 100644 index faade41..0000000 Binary files a/docs/favicon-16x16.png and /dev/null differ diff --git a/docs/favicon-32x32.png b/docs/favicon-32x32.png deleted file mode 100644 index 2314cd3..0000000 Binary files a/docs/favicon-32x32.png and /dev/null differ diff --git a/docs/favicon.ico b/docs/favicon.ico deleted file mode 100644 index 0dd94d6..0000000 Binary files a/docs/favicon.ico and /dev/null differ diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 025833e..0000000 --- a/docs/index.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - -Plot a Correlogram β€’ corrgram - - - - - - - - - - - - - - - - - -
-
- - - - -
-
-
- - -

Homepage: https://kwstat.github.io/corrgram

-

Repository: https://github.com/kwstat/corrgram

-

The corrgram package provides a simple way to create correlograms from raw data or a correlation matrix.

-

Key features:

-
    -
  • Stable, well-tested, widely used.

  • -
  • Extensive examples show how to customize the display.

  • -
- -
-

-Usage

-
require(corrgram)
-corrgram(mtcars, order=TRUE, lower.panel=panel.shade, upper.panel=panel.pie,
-         text.panel=panel.txt, main="mtcars")
-

corrgram

-
-
-
- - -
- - -
- -
-

Site built with pkgdown 1.4.0.

-
- -
-
- - - - - - diff --git a/docs/link.svg b/docs/link.svg deleted file mode 100644 index 88ad827..0000000 --- a/docs/link.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/docs/logo.png b/docs/logo.png deleted file mode 100644 index de9aa24..0000000 Binary files a/docs/logo.png and /dev/null differ diff --git a/docs/news/index.html b/docs/news/index.html deleted file mode 100644 index 128b77c..0000000 --- a/docs/news/index.html +++ /dev/null @@ -1,339 +0,0 @@ - - - - - - - - -Changelog β€’ corrgram - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
-
- - -
-

-corrgram 1.14 - unpublished Unreleased -

-
    -
  • The seriation package is moved from Imports to Suggests. This makes corrgram lighter loading for most people.

  • -
  • The outer.labels argument has improved default values.

  • -
-
-
-

-corrgram 1.13 - Jul 2018 2018-07-09 -

-
    -
  • Test coverage at 95% using covr package.

  • -
  • New panel.fill() function, omits diagonal lines.

  • -
  • panel.conf and panel.cor now auto-scale based on absolute value of correlations.

  • -
  • panel.conf now only allows cor.method="pearson" (which is the default.) Fix issue #13.

  • -
-
-
-

-corrgram 1.12 - May 2017 2017-05-07 -

-
    -
  • New vignette about an invalid correlation matrix.

  • -
  • corrgram() gives a better warning if a symmetric matrix has values outside [-1,1].

  • -
  • Added package logo on github.

  • -
-
-
-

-corrgram 1.11 - Apr 2017 2017-04-03 -

-
    -
  • New argument outer.labels for adding labels along outside edges of corrgram. (Request of Vanessa Bruat and others.)
  • -
-
-
-

-corrgram 1.10 - Nov 2016 2016-11-09 -

-
    -
  • Function corrgram() now returns the correlation matrix.

  • -
  • Fixed custom label ordering when order=TRUE for M.Bruneaux.

  • -
  • Began using testthat package.

  • -
-
-
-

-corrgram 1.9 - Jul 2016 2016-07-16 -

-
    -
  • New panel function panel.cor for colored correlation values.

  • -
  • Fixed minor bugs with no complete cases.

  • -
  • Added more cases to tests directory.

  • -
-
-
-

-corrgram 1.8 - Jul 2015 2015-07-03 -

-
    -
  • Namespace changes due to R devel changes.
  • -
-
-
-

-corrgram 1.7 - Feb 2015 2015-02-13 -

-
    -
  • Added more seriate options.
  • -
-
-
-

-corrgram 1.6 - Aug 2014 2014-08-29 -

-
    -
  • Moved packages from Depends to Imports.

  • -
  • Argument label.pos now defaults to c(.5, .5) for x,y positioning. (Request of Evan Williams).

  • -
  • New argument cor.method. (Request of Evan Williams).

  • -
-
-
-

-corrgram 1.5 - Aug 2013 2013-08-29 -

-
    -
  • Updated references links. (Request of Michael Friendly).

  • -
  • Fixed small bug with test for correlation matrix. (Reported by F. Rosa)

  • -
-
-
-

-corrgram 1.4 - Nov 2012 2012-11-07 -

-
    -
  • New argument col.regions to specify panel colors.

  • -
  • Re-worked examples section for more variety.

  • -
-
-
-

-corrgram 1.3 - Aug 2012 2012-08-15 -

-
    -
  • New panel function panel.bar. (Request of dadrivr)

  • -
  • Added example for unclipped labels (in the test suite).

  • -
-
-
-

-corrgram 1.2 - Mar 2012 2012-03-28 -

-
    -
  • Small bug. Now accepts NA values in correlation matrices, and NAs caused by missing combinations of data and cor(use=β€œpair”).

  • -
  • Non-numeric columns in the data will be ignored. (Request of JZ)

  • -
  • New panel function panel.density.

  • -
  • Test suite now includes corrgram of inverse correlation, partial correlation matrices.

  • -
-
-
-

-corrgram 1.1 - Oct 2011 2011-10-20 -

-
    -
  • Added namespace.
  • -
-
-
-

-corrgram 1.0 - Jul 2011 2011-07-02 -

-
    -
  • New panel function panel.conf.

  • -
  • New data set vote.

  • -
  • New arguments dir, type, label.srt, title, abs.

  • -
  • Now works for either a data.frame or a correlation matrix using the type argument.

  • -
  • New ordering method OLO using seriation package.

  • -
  • Ordering can now be done on absolute value of correlations.

  • -
-
-
-

-corrgram 0.1 - Dec 2006 2006-11-30 -

-
    -
  • First release to CRAN.
  • -
-
-
-

-corrgram 0.0 - Apr 2006 Unreleased -

-
    -
  • Package development begins.
  • -
-
-
- - - -
- - -
- - -
-

Site built with pkgdown 1.4.0.

-
- -
-
- - - - - - - - diff --git a/docs/pkgdown.css b/docs/pkgdown.css deleted file mode 100644 index 9145958..0000000 --- a/docs/pkgdown.css +++ /dev/null @@ -1,256 +0,0 @@ -/* Sticky footer */ - -/** - * Basic idea: https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ - * Details: https://github.com/philipwalton/solved-by-flexbox/blob/master/assets/css/components/site.css - * - * .Site -> body > .container - * .Site-content -> body > .container .row - * .footer -> footer - * - * Key idea seems to be to ensure that .container and __all its parents__ - * have height set to 100% - * - */ - -html, body { - height: 100%; -} - -body > .container { - display: flex; - height: 100%; - flex-direction: column; -} - -body > .container .row { - flex: 1 0 auto; -} - -footer { - margin-top: 45px; - padding: 35px 0 36px; - border-top: 1px solid #e5e5e5; - color: #666; - display: flex; - flex-shrink: 0; -} -footer p { - margin-bottom: 0; -} -footer div { - flex: 1; -} -footer .pkgdown { - text-align: right; -} -footer p { - margin-bottom: 0; -} - -img.icon { - float: right; -} - -img { - max-width: 100%; -} - -/* Fix bug in bootstrap (only seen in firefox) */ -summary { - display: list-item; -} - -/* Typographic tweaking ---------------------------------*/ - -.contents .page-header { - margin-top: calc(-60px + 1em); -} - -/* Section anchors ---------------------------------*/ - -a.anchor { - margin-left: -30px; - display:inline-block; - width: 30px; - height: 30px; - visibility: hidden; - - background-image: url(./link.svg); - background-repeat: no-repeat; - background-size: 20px 20px; - background-position: center center; -} - -.hasAnchor:hover a.anchor { - visibility: visible; -} - -@media (max-width: 767px) { - .hasAnchor:hover a.anchor { - visibility: hidden; - } -} - - -/* Fixes for fixed navbar --------------------------*/ - -.contents h1, .contents h2, .contents h3, .contents h4 { - padding-top: 60px; - margin-top: -40px; -} - -/* Sidebar --------------------------*/ - -#sidebar { - margin-top: 30px; - position: -webkit-sticky; - position: sticky; - top: 70px; -} -#sidebar h2 { - font-size: 1.5em; - margin-top: 1em; -} - -#sidebar h2:first-child { - margin-top: 0; -} - -#sidebar .list-unstyled li { - margin-bottom: 0.5em; -} - -.orcid { - height: 16px; - /* margins are required by official ORCID trademark and display guidelines */ - margin-left:4px; - margin-right:4px; - vertical-align: middle; -} - -/* Reference index & topics ----------------------------------------------- */ - -.ref-index th {font-weight: normal;} - -.ref-index td {vertical-align: top;} -.ref-index .icon {width: 40px;} -.ref-index .alias {width: 40%;} -.ref-index-icons .alias {width: calc(40% - 40px);} -.ref-index .title {width: 60%;} - -.ref-arguments th {text-align: right; padding-right: 10px;} -.ref-arguments th, .ref-arguments td {vertical-align: top;} -.ref-arguments .name {width: 20%;} -.ref-arguments .desc {width: 80%;} - -/* Nice scrolling for wide elements --------------------------------------- */ - -table { - display: block; - overflow: auto; -} - -/* Syntax highlighting ---------------------------------------------------- */ - -pre { - word-wrap: normal; - word-break: normal; - border: 1px solid #eee; -} - -pre, code { - background-color: #f8f8f8; - color: #333; -} - -pre code { - overflow: auto; - word-wrap: normal; - white-space: pre; -} - -pre .img { - margin: 5px 0; -} - -pre .img img { - background-color: #fff; - display: block; - height: auto; -} - -code a, pre a { - color: #375f84; -} - -a.sourceLine:hover { - text-decoration: none; -} - -.fl {color: #1514b5;} -.fu {color: #000000;} /* function */ -.ch,.st {color: #036a07;} /* string */ -.kw {color: #264D66;} /* keyword */ -.co {color: #888888;} /* comment */ - -.message { color: black; font-weight: bolder;} -.error { color: orange; font-weight: bolder;} -.warning { color: #6A0366; font-weight: bolder;} - -/* Clipboard --------------------------*/ - -.hasCopyButton { - position: relative; -} - -.btn-copy-ex { - position: absolute; - right: 0; - top: 0; - visibility: hidden; -} - -.hasCopyButton:hover button.btn-copy-ex { - visibility: visible; -} - -/* headroom.js ------------------------ */ - -.headroom { - will-change: transform; - transition: transform 200ms linear; -} -.headroom--pinned { - transform: translateY(0%); -} -.headroom--unpinned { - transform: translateY(-100%); -} - -/* mark.js ----------------------------*/ - -mark { - background-color: rgba(255, 255, 51, 0.5); - border-bottom: 2px solid rgba(255, 153, 51, 0.3); - padding: 1px; -} - -/* vertical spacing after htmlwidgets */ -.html-widget { - margin-bottom: 10px; -} - -/* fontawesome ------------------------ */ - -.fab { - font-family: "Font Awesome 5 Brands" !important; -} - -/* don't display links in code chunks when printing */ -/* source: https://stackoverflow.com/a/10781533 */ -@media print { - code a:link:after, code a:visited:after { - content: ""; - } -} diff --git a/docs/pkgdown.js b/docs/pkgdown.js deleted file mode 100644 index 087a762..0000000 --- a/docs/pkgdown.js +++ /dev/null @@ -1,113 +0,0 @@ -/* http://gregfranko.com/blog/jquery-best-practices/ */ -(function($) { - $(function() { - - $('.navbar-fixed-top').headroom(); - - $('body').css('padding-top', $('.navbar').height() + 10); - $(window).resize(function(){ - $('body').css('padding-top', $('.navbar').height() + 10); - }); - - $('body').scrollspy({ - target: '#sidebar', - offset: 60 - }); - - $('[data-toggle="tooltip"]').tooltip(); - - var cur_path = paths(location.pathname); - var links = $("#navbar ul li a"); - var max_length = -1; - var pos = -1; - for (var i = 0; i < links.length; i++) { - if (links[i].getAttribute("href") === "#") - continue; - // Ignore external links - if (links[i].host !== location.host) - continue; - - var nav_path = paths(links[i].pathname); - - var length = prefix_length(nav_path, cur_path); - if (length > max_length) { - max_length = length; - pos = i; - } - } - - // Add class to parent
  • , and enclosing
  • if in dropdown - if (pos >= 0) { - var menu_anchor = $(links[pos]); - menu_anchor.parent().addClass("active"); - menu_anchor.closest("li.dropdown").addClass("active"); - } - }); - - function paths(pathname) { - var pieces = pathname.split("/"); - pieces.shift(); // always starts with / - - var end = pieces[pieces.length - 1]; - if (end === "index.html" || end === "") - pieces.pop(); - return(pieces); - } - - // Returns -1 if not found - function prefix_length(needle, haystack) { - if (needle.length > haystack.length) - return(-1); - - // Special case for length-0 haystack, since for loop won't run - if (haystack.length === 0) { - return(needle.length === 0 ? 0 : -1); - } - - for (var i = 0; i < haystack.length; i++) { - if (needle[i] != haystack[i]) - return(i); - } - - return(haystack.length); - } - - /* Clipboard --------------------------*/ - - function changeTooltipMessage(element, msg) { - var tooltipOriginalTitle=element.getAttribute('data-original-title'); - element.setAttribute('data-original-title', msg); - $(element).tooltip('show'); - element.setAttribute('data-original-title', tooltipOriginalTitle); - } - - if(ClipboardJS.isSupported()) { - $(document).ready(function() { - var copyButton = ""; - - $(".examples, div.sourceCode").addClass("hasCopyButton"); - - // Insert copy buttons: - $(copyButton).prependTo(".hasCopyButton"); - - // Initialize tooltips: - $('.btn-copy-ex').tooltip({container: 'body'}); - - // Initialize clipboard: - var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { - text: function(trigger) { - return trigger.parentNode.textContent; - } - }); - - clipboardBtnCopies.on('success', function(e) { - changeTooltipMessage(e.trigger, 'Copied!'); - e.clearSelection(); - }); - - clipboardBtnCopies.on('error', function() { - changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); - }); - }); - } -})(window.jQuery || window.$) diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml deleted file mode 100644 index 47c0c0d..0000000 --- a/docs/pkgdown.yml +++ /dev/null @@ -1,7 +0,0 @@ -pandoc: 2.7.2 -pkgdown: 1.4.0 -pkgdown_sha: ~ -articles: - corrgram_cov2cor: corrgram_cov2cor.html - corrgram_examples: corrgram_examples.html - diff --git a/docs/reference/auto-1.png b/docs/reference/auto-1.png deleted file mode 100644 index 49fc794..0000000 Binary files a/docs/reference/auto-1.png and /dev/null differ diff --git a/docs/reference/auto.html b/docs/reference/auto.html deleted file mode 100644 index daac1f2..0000000 --- a/docs/reference/auto.html +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - - - -Statistics of 1979 automobile models β€” auto β€’ corrgram - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Statistics for 74 automobiles in the 1979 model year as sold in the US.

    -
    - -
    auto
    - - -

    Format

    - -

    A data frame with 74 observations on the following 14 variables.

    -
    Model

    Make and model of car.

    -
    Origin

    a factor with levels A,E,J

    -
    Price

    Price in dollars.

    -
    MPG

    Miles per gallon.

    -
    Rep78

    Repair record for 1978 on 1 (worst) to 5 (best) scale.

    -
    Rep77

    Repair record for 1978 on 1 to 5 scale.

    -
    Hroom

    Headroom in inches.

    -
    Rseat

    Rear seat clearance in inches.

    -
    Trunk

    Trunk volume in cubic feet.

    -
    Weight

    Weight in pounds.

    -
    Length

    Length in inches.

    -
    Turn

    Turning diameter in feet.

    -
    Displa

    Engine displacement in cubic inches.

    -
    Gratio

    Gear ratio for high gear.

    - -
    -

    Source

    - -

    This data frame was created from -http://euclid.psych.yorku.ca/ftp/sas/sssg/data/auto.sas

    -

    Details

    - -

    The data is from various sources, primarily Consumer Reports, April, -1979, and the United States government EPA statistics on fuel consumption.

    -

    References

    - -

    Originally published in Chambers, Cleveland, Kleiner, and Tukey, -Graphical Methods for Data Analysis, 1983, pages 352-355.

    - -

    Examples

    -
    -corrgram(auto[, -c(1:2)])
    -
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.4.0.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/baseball-1.png b/docs/reference/baseball-1.png deleted file mode 100644 index 0d53678..0000000 Binary files a/docs/reference/baseball-1.png and /dev/null differ diff --git a/docs/reference/baseball.html b/docs/reference/baseball.html deleted file mode 100644 index eb3a02b..0000000 --- a/docs/reference/baseball.html +++ /dev/null @@ -1,232 +0,0 @@ - - - - - - - - -Baseball Hitter's Data β€” baseball β€’ corrgram - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Data are for 322 Major Leaque Baseball regular and substitute hitters in -1986.

    -
    - -
    baseball
    - - -

    Format

    - -

    A data frame with 322 observations on the following 22 variables.

    -
    Name

    The hitter/player's name

    -
    League

    Player's league (American/National) at the beginning -of 1987

    -
    Team

    Player's team at the beginning of 1987

    -
    Position

    Player's position in 1986: 1B=First base, -2B=Second base, 3B=Third base, C=Catcher, OF=Outfild, DH=Designated hitter, -SS=Short stop, UT=Utility

    -
    Atbat

    Number of times at bat in 1986

    -
    Hits

    Number of hits in 1986

    -
    Homer

    Number of home runs in 1986

    -
    Runs

    Number of runs in 1986

    -
    RBI

    Runs batted in during 1986

    -
    Walks

    Number of walks in 1986

    -
    Years

    Number of years in the major leagues

    -
    Atbatc

    Number of times at bat in his career

    -
    Hitsc

    Number of hits in career

    -
    Homerc

    Number of home runs in career

    -
    Runsc

    Number of runs in career

    -
    RBIc

    Number of Runs Batted In in career

    -
    Walksc

    Number of walks in career

    -
    Putouts

    Number of putouts in 1986

    -
    Assists

    Number of assists in 1986

    -
    Errors

    Number of errors in 1986

    -
    Salary

    Annual salary (in thousands) on opening day 1987

    -
    logSal

    Log of salary

    -
    -

    Source

    - -

    The data was originally published for the 1988 ASA Statistical -Graphics and Computing Data Exposition: -http://lib.stat.cmu.edu/data-expo/1988.html.

    -

    The version of the data used to create this data was found at -http://euclid.psych.yorku.ca/ftp/sas/sssg/data/baseball.sas

    -

    Details

    - -

    The levels of the player's positions have been collapsed to fewer levels for -a simpler analysis. See the original data for the full list of positions.

    -

    The salary data were taken from Sports Illustrated, April 20, 1987. The -salary of any player not included in that article is listed as an NA. The -1986 and career statistics were taken from The 1987 Baseball Encyclopedia -Update published by Collier Books, Macmillan Publishing Company, New York.

    -

    References

    - -

    Michael Friendly (2002). Corrgrams: Exploratory Displays for Correlation -Matrices, The American Statistician, Vol 56.

    - -

    Examples

    -
    -vars2 <- c("Assists","Atbat","Errors","Hits","Homer","logSal", - "Putouts","RBI","Runs","Walks","Years") -corrgram(baseball[,vars2], - lower.panel=panel.shade, upper.panel=panel.pie)
    -
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.4.0.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/corrgram-1.png b/docs/reference/corrgram-1.png deleted file mode 100644 index 9b46b89..0000000 Binary files a/docs/reference/corrgram-1.png and /dev/null differ diff --git a/docs/reference/corrgram-2.png b/docs/reference/corrgram-2.png deleted file mode 100644 index 3c67068..0000000 Binary files a/docs/reference/corrgram-2.png and /dev/null differ diff --git a/docs/reference/corrgram-3.png b/docs/reference/corrgram-3.png deleted file mode 100644 index fb3c015..0000000 Binary files a/docs/reference/corrgram-3.png and /dev/null differ diff --git a/docs/reference/corrgram-4.png b/docs/reference/corrgram-4.png deleted file mode 100644 index 8ce9baf..0000000 Binary files a/docs/reference/corrgram-4.png and /dev/null differ diff --git a/docs/reference/corrgram-5.png b/docs/reference/corrgram-5.png deleted file mode 100644 index 8feb189..0000000 Binary files a/docs/reference/corrgram-5.png and /dev/null differ diff --git a/docs/reference/corrgram.html b/docs/reference/corrgram.html deleted file mode 100644 index 5dabe6e..0000000 --- a/docs/reference/corrgram.html +++ /dev/null @@ -1,348 +0,0 @@ - - - - - - - - -Draw a correlogram β€” corrgram β€’ corrgram - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    The corrgram function produces a graphical display of a correlation matrix, -called a correlogram. The cells of the matrix can be shaded or colored to -show the correlation value.

    -
    - -
    corrgram(x, type = NULL, order = FALSE, labels, panel = panel.shade,
    -  lower.panel = panel, upper.panel = panel, diag.panel = NULL,
    -  text.panel = textPanel, label.pos = c(0.5, 0.5), label.srt = 0,
    -  cex.labels = NULL, font.labels = 1, row1attop = TRUE, dir = "",
    -  gap = 0, abs = FALSE, col.regions = colorRampPalette(c("red",
    -  "salmon", "white", "royalblue", "navy")), cor.method = "pearson",
    -  outer.labels = NULL, ...)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    x

    A tall data frame with one observation per row, or a -correlation matrix.

    type

    Use 'data' or 'cor'/'corr' to explicitly specify that 'x' is -data or a correlation matrix. Rarely needed.

    order

    Should variables be re-ordered? Use TRUE or "PCA" for PCA-based -re-ordering. -If the 'seriation' package is loaded, this can also be set to "OLO" for optimal -leaf ordering, "GW", and "HC".

    labels

    Labels to use (instead of data frame variable names) for -diagonal panels. If 'order' option is used, this vector of labels will be -also be appropriately reordered by the function.

    panel

    Function used to plot the contents of each panel.

    lower.panel, upper.panel

    Separate panel functions used below/above the -diagonal.

    diag.panel, text.panel

    Panel function used on the diagonal.

    label.pos

    Horizontal and vertical placement of label in diagonal -panels.

    label.srt

    String rotation for diagonal labels.

    cex.labels, font.labels

    Graphics parameter for diagonal panels.

    row1attop

    TRUE for diagonal like " \ ", FALSE for diagonal like " / ".

    dir

    Use dir="left" instead of 'row1attop'.

    gap

    Distance between panels.

    abs

    Use absolute value of correlations for clustering? Default FALSE.

    col.regions

    A function returning a vector of colors.

    cor.method

    Correlation method to use in panel functions. Default is -'pearson'. Alternatives: 'spearman', 'kendall'.

    outer.labels

    A list of the form 'list(bottom,left,top,right)'. -If 'bottom=TRUE' (for example), variable labels are added along the -bottom outside edge.

    -

    For more control, use 'bottom=list(labels,cex,srt,adj)', where 'labels' is a vector -of variable labels, 'cex' affects the size, 'srt' affects the rotation, and 'adj' -affects the adjustment of the labels. -Defaults: 'labels' uses column names; cex=1'; -'srt=90' (bottom/top), 'srt=0' (left/right); -'adj=1' (bottom/left), 'adj=0' (top/right).

    ...

    Additional arguments passed to plotting methods.

    - -

    Value

    - -

    The correlation matrix used for plotting is returned. The 'order' and 'abs' -arguments affect the returned value.

    -

    Details

    - -

    Note: Use the 'col.regions' argument to specify colors.

    -

    Non-numeric columns in the data will be ignored.

    -

    The off-diagonal panels are specified with panel.pts, -panel.pie, panel.shade, panel.fill, `panel.bar, -panel.ellipse, panel.conf. panel.cor.

    -

    Diagonal panels are specified with panel.txt, panel.minmax, -panel.density.

    -

    Use a NULL panel to omit drawing the panel.

    -

    This function is basically a modification of the pairs.default -function with the use of customized panel functions.

    -

    The panel.conf function uses cor.test and calculates pearson -correlations. Confidence intervals are not available in cor.test for -other methods (kendall, spearman).

    -

    You can create your own panel functions by starting with one of the included -panel functions and making suitable modifications. Note that because of the -way the panel functions are called inside the main function, your custom -panel function must include the arguments shown in the panel.pts -function, even if the custom panel function does not use those arguments!

    -

    TODO: legend, grid graphics version.

    -

    References

    - -

    Friendly, Michael. 2002. Corrgrams: Exploratory Displays for -Correlation Matrices. The American Statistician, 56, 316--324. -http://datavis.ca/papers/corrgram.pdf

    -

    D. J. Murdoch and E. D. Chow. 1996. A Graphical Display of Large Correlation -Matrices. The American Statistician, 50, 178-180.

    - -

    Examples

    -
    -# To reproduce the figures in Michael Friendly's paper, see the -# vignette, or see the file 'friendly.r' in this package's -# test directory. - -# Demonstrate density panel, correlation confidence panel -corrgram(iris, lower.panel=panel.pts, upper.panel=panel.conf, - diag.panel=panel.density)
    -# Demonstrate panel.shade, panel.pie, principal component ordering -vars2 <- c("Assists","Atbat","Errors","Hits","Homer","logSal", - "Putouts","RBI","Runs","Walks","Years") -corrgram(baseball[vars2], order=TRUE, main="Baseball data PC2/PC1 order", - lower.panel=panel.shade, upper.panel=panel.pie)
    -# CAUTION: The latticeExtra package also has a 'panel.ellipse' function -# that clashes with the same-named function in corrgram. In order to use -# the right one, the example below uses 'lower.panel=corrgram::panel.ellipse'. -# If you do not have latticeExtra loaded, you can just use -# 'lower.panel=panel.ellipse'. - -# Demonstrate panel.bar, panel.ellipse, panel.minmax, col.regions -corrgram(auto, order=TRUE, main="Auto data (PC order)", - lower.panel=corrgram::panel.ellipse, - upper.panel=panel.bar, diag.panel=panel.minmax, - col.regions=colorRampPalette(c("darkgoldenrod4", "burlywood1", - "darkkhaki", "darkgreen")))
    -# 'vote' is a correlation matrix, not a data frame -corrgram(vote, order=TRUE, upper.panel=panel.cor)
    - -# outer labels, all options, larger margins, xlab, ylab -labs=colnames(state.x77) -corrgram(state.x77, oma=c(7, 7, 2, 2), - outer.labels=list(bottom=list(labels=labs,cex=1.5,srt=60), - left=list(labels=labs,cex=1.5,srt=30,adj=c(1,0))))
    mtext("Bottom", side=1, cex=2, line = -1.5, outer=TRUE, xpd=NA)
    mtext("Left", side=2, cex=2, line = -1.5, outer=TRUE, xpd=NA)
    -
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.4.0.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/figures/corrgram_full_logo.png b/docs/reference/figures/corrgram_full_logo.png deleted file mode 100644 index d0c6967..0000000 Binary files a/docs/reference/figures/corrgram_full_logo.png and /dev/null differ diff --git a/docs/reference/figures/corrgram_mtcars.png b/docs/reference/figures/corrgram_mtcars.png deleted file mode 100644 index db010db..0000000 Binary files a/docs/reference/figures/corrgram_mtcars.png and /dev/null differ diff --git a/docs/reference/figures/logo.png b/docs/reference/figures/logo.png deleted file mode 100644 index de9aa24..0000000 Binary files a/docs/reference/figures/logo.png and /dev/null differ diff --git a/docs/reference/index.html b/docs/reference/index.html deleted file mode 100644 index 079293f..0000000 --- a/docs/reference/index.html +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - - - -Function reference β€’ corrgram - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    All functions

    -

    -
    -

    auto

    -

    Statistics of 1979 automobile models

    -

    baseball

    -

    Baseball Hitter's Data

    -

    corrgram()

    -

    Draw a correlogram

    -

    vote

    -

    Voting correlations

    -
    - - -
    - - -
    - - -
    -

    Site built with pkgdown 1.4.0.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/vote-1.png b/docs/reference/vote-1.png deleted file mode 100644 index 7b66105..0000000 Binary files a/docs/reference/vote-1.png and /dev/null differ diff --git a/docs/reference/vote.html b/docs/reference/vote.html deleted file mode 100644 index dfa70bb..0000000 --- a/docs/reference/vote.html +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - -Voting correlations β€” vote β€’ corrgram - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Voting correlations

    -
    - -
    vote
    - - -

    Format

    - -

    A 12x12 matrix.

    -

    Source

    - -

    Torben Iversen and David Soskice (2006). Electoral institutions and -the politics of coalitions: Why some democracies redistribute more than -others. American Political Science Review, 100, 165-81. Table A2.

    -

    Details

    - -

    These are the correlations of traits, where each trait is measured for 17 -developed countries (Europe, US, Japan, Australia, New Zealand).

    -

    References

    - -

    Using Graphs Instead of Tables. -http://tables2graphs.com/doku.php?id=03_descriptive_statistics

    - -

    Examples

    -
    -corrgram(vote, order=TRUE)
    -
    -
    - -
    - - - -
    - - - - - - - -