使用R的向量的列名?

时间:2014-03-04 00:11:24

标签: r vector names

 > coefficients
 [1] -0.052993570  0.071073199 -0.004234659 -0.005725687 

如何重命名我的矢量“系数”的列才能获得?

> coefficients
      int           X1          X2           X3     
 -0.052993570  0.071073199 -0.004234659 -0.005725687 

谢谢!

1 个答案:

答案 0 :(得分:1)

names(coefficients) <- c("int","X1","X2","X3")