taiyun / corrplot
Showing 2 of 6 files from the diff.

@@ -47,9 +47,6 @@
Loading
47 47
#'
48 48
#' @param title Character, title of the graph.
49 49
#'
50 -
#' @param is.corr Logical, whether the input matrix is a correlation matrix or
51 -
#'   not. We can visualize the non-correlation matrix by setting
52 -
#'   \code{is.corr = FALSE}.
53 50
#'
54 51
#' @param add Logical, if \code{TRUE}, the graph is added to an existing plot,
55 52
#'   otherwise a new plot will be created.
@@ -101,6 +98,16 @@
Loading
101 98
#' @param rect.lwd Numeric, line width for borders for rectangle border(s), only
102 99
#'   valid when \code{addrect} is equal or greater than 1.
103 100
#'
101 +
#'
102 +
#' @param is.corr Logical, whether the input matrix is a correlation matrix or
103 +
#'   not. We can visualize the non-correlation matrix by setting
104 +
#'   \code{is.corr = FALSE}.
105 +
#'
106 +
#' @param ignoreSign Logical, whether or not to ignore matrix values' sign when assigning colors
107 +
#’   for non-corr matrix.
108 +
#'   Only valid when \code{is.corr = FALSE}. The default value is \code{FALSE}.
109 +
#'
110 +
#'
104 111
#' @param tl.pos Character or logical, position of text labels. If character, it
105 112
#'   must be one of \code{'lt'}, \code{'ld'}, \code{'td'}, \code{'d'} or
106 113
#'   \code{'n'}. \code{'lt'}(default if \code{type=='full'}) means left and top,
@@ -260,7 +267,7 @@
Loading
260 267
corrplot = function(corr,
261 268
  method = c('circle', 'square', 'ellipse', 'number', 'shade', 'color', 'pie'),
262 269
  type = c('full', 'lower', 'upper'), col = NULL, col.lim = NULL, bg = 'white',
263 -
  title = '', is.corr = TRUE, add = FALSE,   diag = TRUE, outline = FALSE,
270 +
  title = '', add = FALSE,   diag = TRUE, outline = FALSE,
264 271
  mar = c(0, 0, 0, 0),
265 272
266 273
  addgrid.col = NULL, addCoef.col = NULL, addCoefasPercent = FALSE,
@@ -270,6 +277,8 @@
Loading
270 277
                    'average', 'mcquitty', 'median', 'centroid'),
271 278
  addrect = NULL, rect.col = 'black', rect.lwd = 2,
272 279
280 +
  is.corr = TRUE, ignoreSign = FALSE,
281 +
273 282
  tl.pos = NULL, tl.cex = 1,
274 283
  tl.col = 'red', tl.offset = 0.4, tl.srt = 90,
275 284
@@ -380,8 +389,8 @@
Loading
380 389
      warning('col.lim interval too wide, please set a suitable value')
381 390
    }
382 391
383 -
    # all negative or positive, trans to [0, 1]
384 -
    if (c_max <= 0 | c_min>=0) {
392 +
    # all negative or positive or NOT keepSign, trans to [0, 1]
393 +
    if (c_max <= 0 | c_min>=0 | ignoreSign) {
385 394
      intercept = - col.lim[1]
386 395
      zoom = 1 / (diff(col.lim))
387 396

@@ -58,7 +58,7 @@
Loading
58 58
59 59
  # fixed issue #102
60 60
  # restore this parameter when exiting the corrplot.mixed function in any way
61 -
  oldpar = par(mar = mar, bg = 'white')
61 +
  oldpar = par(mar = mar, bg = par()$bg)
62 62
  on.exit(par(oldpar), add = TRUE)
63 63
64 64
  corrplot(corr, type = 'upper', method = upper, diag = TRUE,
Files Coverage
R 99.85%
Project Totals (9 files) 99.85%
1
comment: false
2

3
coverage:
4
  status:
5
    project: false
6
    patch: false
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading