Closed ChristopherEeles closed 1 year ago
Thanks for highlighting. Is this something that is a common occurence for you?
I'm happy to add this to the next release but don't feel it requires a patch. If people are coercing data to arrays then the typical use case would be multidimensional. It is easy for the user to add a catch to a batch job for length 1 dimension atttributes and coerce to vector in the meantime.
Fixed in version 2.2.4 that has been sent to CRAN.
Hey Rebecca @rkillick ,
Sorry I must have missed your first reply but thanks for fixing the issue. It was specifically breaking code in the Easy Copy Number package which our lab uses for calling CNAs from several microarray platforms.
Best, Chris
I noticed this specifically inside of
cpt.var
, but I imagine it applies to all other places that you check for 1D-ness viais.null(dim(x))
.If you make a vector then coerce it to an array, it gets a
dim
method. As a result in your checks for for 1D-ness in the packagen
becomesNULL
for 1D- arrays and a missing where TRUE/FALSE needed error is thrown.A solution would be to add a second check like:
is.null(dim(x)) || length(dim(x)) == 1
Reprex
sessionInfo