項目 | サンプル | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
全列の列名を変更したい |
|
|||||||||||||||
ある列だけ列名を変更したい |
|
|
=> |
|
table=cbind(1, 0.8, "s001");
//
result("C1","C2","C3") = table;
filedNameOrg = titles(table);
filedNameNew = {"C1","C2","C3"};
result(filedNameNew) = table(filedNameOrg);
|
=> |
|
table=cbind(1, 0.8, "s001");
//
result("A1","CC2","A3") = table("A1","A2","A3");
nameOrg = "A2"; nameNew = "CC2"; colNameListOrg = titles(table); colNameListNew = replace.str(colNameListOrg,nameOrg,nameNew); result(colNameListNew) = table(colNameListOrg);