I'm taking the columns from a data frame and using them to create another data frame, but the names keep getting jumbled instead of keeping the original name. How do I avoid this?
> 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
It should be like this:
> newDigit1 <- data.frame((security_id = rsPred1$security_id))
> head(newDigit1)
security_id
1 1
2 6
3 5
4 3
5 3
6 2