plot - R cooccur package error when plotting data -
i'm having trouble cooccur package. after creating cooccur object, i'm trying plot obtain heatmap of positive/negative co-occurrence. should simple- code in example "plot(cooccur_object)" it's throwing error: error in zero_range(from) : x must length 1 or 2. i've included reproducible code, , ideas welcome. error seems depend on numbers themselves, example code works "finches" data set , throws errors when numbers randomly generated. reproducible code below throws error, if change seed it'll run , won't. thoughts?
set.seed(13532) <- rnorm(100) a[a>0] <- 1 a[a<0] <- 0 b <- matrix(a, ncol = 10) df <- as.data.frame(b) names(df) <- c(paste("subject", 1:10)) row.names(df) <- c(paste("disease", letters[1:10])) df library(cooccur) cooc <- cooccur(df) plot(cooc) summary(cooc)
thank interest in cooccur. package author , willing communicate issues have.
since have created random matrix, results of co-occurrence analysis (unsurprisingly) there 0 significant results... random. unfortunately, did not think adding warning there no results plot, , thank bringing attention!
feel free email me, don't keep forums.
best, dan griffith
Comments
Post a Comment