If the columns all contain the same class (i.e. integer), you can simply use the rbind()
function to bind columns [4:6] under columns [1:3].
If they have different formats, you can define a new dataset with combined columns:
new.data = data.frame("First"=c(data[,1],data[,4]),
"Second"=c(data[,2],data[,5]),
"Third"=c(data[,3],data[,6]))
With rbind()
you can just add the columns below, as in this example:
> dta = matrix(rep(c(1,2,3,4,5,6),6),ncol=6,byrow=T)
> print(dta)
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] 1 2 3 4 5 6
[2,] 1 2 3 4 5 6
[3,] 1 2 3 4 5 6
[4,] 1 2 3 4 5 6
[5,] 1 2 3 4 5 6
[6,] 1 2 3 4 5 6
> rbind(dta[,1:3],dta[,4:6])
[,1] [,2] [,3]
[1,] 1 2 3
[2,] 1 2 3
[3,] 1 2 3
[4,] 1 2 3
[5,] 1 2 3
[6,] 1 2 3
[7,] 4 5 6
[8,] 4 5 6
[9,] 4 5 6
[10,] 4 5 6
[11,] 4 5 6
[12,] 4 5 6