 <p>check the class of the two objects (label and combined) you notice they are not the same. you can then subset the one with a different dimension with <strong><em>dimRid &lt;- combined[,1]</em></strong> </p>