当我生成此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 / eng
和words / spa
,而不是words...eng
和words...spa
?我对words_/_eng
和words_/_spa
感到满意,如果有帮助的话?