【发布时间】:2016-06-11 10:56:41
【问题描述】:
我想在data.frame 的colnames 中的. 之后插入一个字符串"_2010_"
data("iris")
> names(iris)
[1] "Sepal.Length" "Sepal.Width" "Petal.Length" "Petal.Width" "Species"
所需的输出:
[1] "Sepal._2010_Length" "Sepal._2010_Width" "Petal._2010_Length" "Petal._2010_Width" "Species"
帮助?
编辑:
相关问题:现在如何插入字符串"_2010_" before . ?
[1] "Sepal_2010_.Length" "Sepal_2010_.Width" "Petal_2010_.Length" "Petal_2010_.Width" "Species"
【问题讨论】: