Skip to content

Instantly share code, notes, and snippets.

@goldingn
Created November 21, 2014 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goldingn/bcbf066717fb0618ae3c to your computer and use it in GitHub Desktop.
Save goldingn/bcbf066717fb0618ae3c to your computer and use it in GitHub Desktop.
minimal reproducible example of the bug in circleplot
# 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