Print matrix without column names but kept alligned?

前端 未结 1 1634
深忆病人
深忆病人 2021-01-28 02:04

I would like to print a matrix without column names and found this answer. However, this will result in the columns of the output not being aligned anymore, when the row names a

相关标签:
1条回答
  • 2021-01-28 02:50

    If you really don't want matrix or table class, then you can use data frame, by using that you can easily hide column names and make data kept aligned.

    >d = as.data.frame(m)
    >colnames(d)=NULL
    >d                   
     First Row  A C E G I K
     Second Row B D F H J L
    
    0 讨论(0)
提交回复
热议问题