Skip to content

Commit

Permalink
Merge pull request #100 from vsimko/master
Browse files Browse the repository at this point in the history
incremented version and updated authors
  • Loading branch information
vsimko authored Aug 24, 2017
2 parents 3dfc1f3 + edc6673 commit d7ba847
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
Package: corrplot
Type: Package
Title: Visualization of a Correlation Matrix
Version: 0.82
Date: 2017-02-09
Author: Taiyun Wei, Viliam Simko
Version: 0.83
Date: 2017-08-24
Author: Taiyun Wei and Viliam Simko with contributions by Michael Levy,
Yihui Xie, Yan Jin and jeffzemla
Suggests:
knitr,
RColorBrewer,
Expand Down
16 changes: 10 additions & 6 deletions R/corrplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@
#'
#' @author Taiyun Wei (weitaiyun@@gmail.com)
#' @author Viliam Simko (viliam.simko@@gmail.com)
#' @author Michael Levy (michael.levy@@healthcatalyst.com)
#'
#' @note \code{Cairo} and \code{cairoDevice} packages is strongly recommended to
#' produce high-quality PNG, JPEG, TIFF bitmap files, especially for that
Expand Down Expand Up @@ -799,12 +800,13 @@ corrplot <- function(corr,
if (insig == "label_sig") {

# Unless another character is specified, mark sig with *
if(!is.character(pch))
if (!is.character(pch))
pch <- "*"

place_points <- function(sig.locs, point)
place_points <- function(sig.locs, point) {
text(pos.pNew[,1][sig.locs], pos.pNew[,2][sig.locs],
labels = point, col = pch.col, cex = pch.cex, lwd = 2)
}

if (length(sig.level) == 1) {
place_points(sig.locs = which(pNew < sig.level), point = pch)
Expand All @@ -814,17 +816,19 @@ corrplot <- function(corr,
for (i in seq_along(sig.level)) {
iter <- l + 1 - i
pchTmp <- paste(rep(pch, i), collapse = "")
if(i == length(sig.level)) {
if (i == length(sig.level)) {
locs <- which(pNew < sig.level[iter])
if (length(locs))
if (length(locs)) {
place_points(sig.locs = locs, point = pchTmp)
}
} else {
locs <- which(pNew < sig.level[iter] & pNew > sig.level[iter - 1])
if(length(locs))
if (length(locs)) {
place_points(sig.locs = locs, point = pchTmp)
}
}

}

}

} else {
Expand Down
3 changes: 2 additions & 1 deletion inst/CITATION
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
PKG <- "corrplot"
VERSION <- packageVersion(PKG)
TITLE <- packageDescription(PKG, fields = "Title")
AUTHORS <- packageDescription(PKG, fields = "Author")
AUTHORS <- gsub("\\s+with contrib.*", " et al.",
packageDescription(PKG, fields = "Author"))
URL <- packageDescription(PKG, fields = "URL")
YEAR <- strftime(packageDescription(PKG, fields = "Date"), "%Y")

Expand Down
2 changes: 2 additions & 0 deletions man/corrplot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/testthat/test-corrplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ test_that("Issue #76: separate `col` parameters corrplot.mixed", {
upper = "number", upper.col = "black"))
})

test_that("Mark significant correlations", {
test_that("Issue #99: Mark significant correlations", {
M <- cor(mtcars)
fakepmat <- 1 - abs(M) ^ .2 # Hmisc::rcorr provides a p-value matrix, but
# don't want to introduce the dependency
Expand Down

0 comments on commit d7ba847

Please sign in to comment.