Created
November 21, 2014 13:29
-
-
Save goldingn/bcbf066717fb0618ae3c to your computer and use it in GitHub Desktop.
minimal reproducible example of the bug in circleplot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# load devtools and install the preferred version of circleplot | |
library(devtools) | |
install_github('mjwestgate/circleplot') | |
#install_github('goldingn/circleplot') | |
library(circleplot) | |
# set RNG seed | |
set.seed(1) | |
# create a fake symmetric matrix | |
k <- 10 | |
x <- matrix(runif(k ^ 2), ncol = k) | |
x <- x %*% t(x) | |
diag(x) <- 0 | |
rownames(x) <- colnames(x) <- 1:k | |
# plot it | |
circleplot(x) | |
# this is the highest value, is a line drawn? | |
which(x == max(x), arr.ind = TRUE)[1, ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment