Quantcast
Channel: What does the error "arguments imply differing number of rows: x, y" mean? - Stack Overflow
Viewing all articles
Browse latest Browse all 4

Answer by EDi for What does the error "arguments imply differing number of rows: x, y" mean?

$
0
0

Your data.frame mat is rectangular (n_rows!= n_cols).

Therefore, you cannot make a data.frame out of the column- and rownames, because each column in a data.frame must be the same length.

Maybe this suffices your needs:

require(reshape2)mat$id <- rownames(mat) melt(mat)

Viewing all articles
Browse latest Browse all 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>