Skip to content
Prev 283907 / 398502 Next

indexing by empty string (was RE: Error in predict.randomForest ... subscript out of bounds with NULL name in X)

Hi Ista,

When you write a package, you have to anticipate what users will throw at the code.  I can insist that users only input matriices where none of the column names are empty, but that's not what I wish to impose on the users.  I can add the name if it's empty, but as a user I don't want a function to do that, either.  That's why I need to look for a workaround.

Using which() seems rather clumsy for the purpose, as I need to combine those with the non-empty ones, and preserving ordering would be a mess.

Andy
Notice:  This e-mail message, together with any attachme...{{dropped:11}}