library(SummarizedExperiment)
se <- SummarizedExperiment(assays=list(X=cbind(1:10)))
cbind(se, se[1:5,])
## Error in cbind(...) : number of rows of matrices must match (see arg 2)
Okay, that's pretty helpful. But the following is more obscure:
se <- SummarizedExperiment(rowData=DataFrame(X=1:10))
cbind(se, se[1:5,])
## Error in FUN(X[[i]], ...) :
## column(s) 'X' in ‘mcols’ are duplicated and the data do not match
Of course, I know why this happens, but it would be a lot nicer if it could just say "number of rows don't match". This is especially important because I use SE's cbind internally in some SCE methods; currently, the user ends up with a message about some column they never actually created themselves, while the real error has to do with a mismatching number of rows.
Consider the following example:
Okay, that's pretty helpful. But the following is more obscure:
Of course, I know why this happens, but it would be a lot nicer if it could just say "number of rows don't match". This is especially important because I use SE's
cbind
internally in some SCE methods; currently, the user ends up with a message about some column they never actually created themselves, while the real error has to do with a mismatching number of rows.