Not sure how many people would prefer to have fwrite automatically know to apply as.data.table to a matrix (or, better, just accept a matrix and handle the "conversion" internally instead of doing so in R, which can be costly).
The former is easy to implement, the latter, a bit harder (since matrices are stored column-wise in memory, we'll have to do some index arithmetic to write row-wise)
Not sure how many people would prefer to have
fwriteautomatically know to applyas.data.tableto amatrix(or, better, just accept amatrixand handle the "conversion" internally instead of doing so in R, which can be costly).The former is easy to implement, the latter, a bit harder (since matrices are stored column-wise in memory, we'll have to do some index arithmetic to write row-wise)