数据框列标题中的符号消失

时间:2019-07-08 11:05:09

标签: r dataframe symbols

当我生成此data.frame时:

 df <- data.frame("numbers" = c(1,2,3,4,5), 
       "words / eng" = c("1 / one","2 / two","3 / three","4 / four", "5 / five"), 
       "words / spa" = c("1 / uno","2 / dos","3 / tres","4 / cuatro", "5 / cinco"))

然后看起来像这样:

 > df
   numbers words...eng words...spa
 1       1     1 / one     1 / uno
 2       2     2 / two     2 / dos
 3       3   3 / three    3 / tres
 4       4    4 / four  4 / cuatro
 5       5    5 / five   5 / cinco

如何使列标题读取为words / engwords / spa,而不是words...engwords...spa?我对words_/_engwords_/_spa感到满意,如果有帮助的话?

0 个答案:

没有答案