我正在從數據框中取出列並使用它們來創建另一個數據框,但名稱不斷變得混亂而不是保留原來的名稱。我如何避免這種情況?創建數據框時的R名稱列
> newDigit1 <- data.frame((security_id = rsPred1$security_id))
> head(newDigit1)
X.security_id...rsPred1.security_id.
1 1
2 6
3 5
4 3
5 3
6 2
它應該是這樣的:
> newDigit1 <- data.frame((security_id = rsPred1$security_id))
> head(newDigit1)
security_id
1 1
2 6
3 5
4 3
5 3
6 2
謝謝,很好的接收,做到了。 – screechOwl 2012-01-09 17:05:31