Solves bug in pull request 'reshape2' by jucor and closes issue #15.