When subsetting by column the eSet class, I came across this difficult to diagnose error:
Error in `sampleNames<-`(`*tmp*`, value = c("910910", "1287381", "906862", : 'value' length (965) must equal sample number in AssayData (965)
I discovered that it was due to the fact that I had previously set the assayData of an existing ExpressionSet object using `exprs<-`, while the object also had the se.exprs matrix filled. The exprs setting function let me mismatch the dimensions between exprs and se.exprs, leading to errors when later trying to subset the data. It seems like the exprs function should check for a mismatch in dimensions between exprs and se.exprs, and issue a warning when the matrix dimensions mismatch.