I\'m trying to create a plot from elements of csv file which looks like this:
h1,h2,h3,h4 a,1,0,1,0 b,1,1,0,1 c,0,0,1,0
I tried the followi
Your data.frame mat is rectangular (n_rows!= n_cols).
mat
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.
data.frame
Maybe this suffices your needs:
require(reshape2) mat$id <- rownames(mat) melt(mat)