下面是一个模拟数据,该数据将作为 upt() 函数的输入
nobs <- 4000
pb <- round(runif(n=1, min=0.1, max=0.8),1)
August <- rbinom(n=nobs, size=1, prob=pb)
pb <- round(runif(n=1, min=0.1, max=0.8),1)
September <- rbinom(n=nobs, size=1, prob=pb)
pb <- round(runif(n=1, min=0.1, max=0.8),1)
October <- rbinom(n=nobs, size=1, prob=pb)
pb <- round(runif(n=1, min=0.1, max=0.8),1)
November <- rbinom(n=nobs, size=1, prob=pb)
pb <- round(runif(n=1, min=0.1, max=0.8),1)
December <- rbinom(n=nobs, size=1, prob=pb)
#generate random id
myFun <- function(n = nobs) {
a <- do.call(paste0, replicate(5, sample(LETTERS, n, TRUE), FALSE))
paste0(a, sprintf("%04d", sample(9999, n, TRUE)), sample(LETTERS, n, TRUE))
}
AumPre <- round(runif(n=nobs, min=100000, max=250000))
AumAft <- round(runif(n=nobs, min=100000, max=250000))
AumIncrease <- as.integer(AumAft > AumPre)
ncust <- myFun()
df <- data.frame(ncust
, August
, September
, October
, November
, December
, AumPre
, AumAft
, AumIncrease)
upset(df, boxplot.summary = c("AumAft"))
调用不高兴()时,我不断收到以下错误。
Error in `$<-.data.frame`(`*tmp*`, "x", value = 1L) :
replacement has 1 row, data has 0
似乎其他人遇到了与此处报告的类似问题 https://github.com/hms-dbmi/UpSetR/issues/93
希望能解决这个问题。我喜欢可视化,但在使用我自己的数据集时无法实现。
谢谢