aaronjg / DirichletMultinomial

Dirchlet Multinomial Mixture Distribution by Christopher Quince and Martin Morgan (Unofficial)
6 stars 5 forks source link

Error with unnamed matrix input #3

Open daynefiler opened 6 years ago

daynefiler commented 6 years ago

Produces uninformative error

tstMat <- t(rmultinom(16, 1000, c(0.1, 0.5, 0.2, 0.1, 0.05, 0.05)))
dmn(count = tstMat, k = 6)
# Error in dmn(count = tstMat, k = 6) : 
#  VECTOR_ELT() can only be applied to a 'list', not a 'NULL'

Runs without error

tstMat <- t(rmultinom(16, 1000, c(0.1, 0.5, 0.2, 0.1, 0.05, 0.05)))
rownames(tstMat) <- sprintf("ID%d", 1:16)
colnames(tstMat) <- sprintf("Val%d", 1:6)
dmn(count = tstMat, k = 6)
daynefiler commented 6 years ago

I have created a fork with a branch called 'issue-03'. If you want to create the 'issue-03' branch I can create a PR, or I can create a PR direct to master.

aaronjg commented 6 years ago

Hi,

This repo is actually a fork of the bioconductor package, and had fallen significantly out of date. I just brought it up to date with that repo. Can you check to see if you are still running into the issue? If so, I'll merge in the PR.

daynefiler commented 6 years ago

Sorry -- I assumed this was the development repository for the package. The error was produced using v1.22.0 downloaded from bioconductor.

aaronjg commented 6 years ago

No worries. I just merged in the changes. I also added "Unofficial" to the repository description to make it clear that this is not the official bio conductor repository. You may want to contact the package maintainers to ask them to include your change.