【发布时间】:2017-04-29 14:30:15
【问题描述】:
我有以下列表listaValores
listaValores <- c()
for(valores in 1:numRepeticion){
listaValores <- c(listaValores, readWorksheetFromFile(file = file.read,
sheet = sheet.read,
startRow = startRow.read+(12*(valores-1)),
startCol = startCol.read[i],
endRow = startRow.read+((12*valores)-1) ,
endCol = startCol.read[i], header = FALSE))
}
返回:
$Col1
[1] 32824 35646 34650 29328 27376 28548 35363 34740 49181 57960 55550 50626
$Col1
[1] 52610 55085 58576 51300 50968 58104 56585 38273 54216 59043 67487 58067
$Col1
[1] 59142 68593 77510 73434 83545 83483 79635 69269 85703 73080
如何将其元素重命名为2014、2015、2016?
【问题讨论】:
-
注意,
listaValores是一个列表。因此它的插槽名称不是colnames
标签: r list data-structures rename