In trying to come up with a simple answer here
http://stackoverflow.com/a/19454986/1191259

...I found myself doing something like this:

adj1mat           <- as.matrix(adj1[,-1,with=FALSE])
rownames(adj1mat) <- as.character(adj1$rn)

which is awkward. It would be nice if as.matrix.data.table could invert
keep.rownames=TRUE from as.data.table.* (for data.frames or matrices) by
putting the rownames in place. If that were the case, I could just write...

adj1mat           <- as.matrix(adj1)

I see in getAnywhere(as.matrix.data.table), that it currently always
assigns NULL rownames. Anyway, it's a minor suggestion.

--Frank
_______________________________________________
datatable-help mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help

Reply via email to