I have data in the *.txt file like this.
rep trt y
1 7 34.55
1 7 65.88
1 7 34.66
2 8 45.66
2 8 34.55
2 8 32.09
3 9 38.99
3 9 33.44
3 9 35.67
How to convert into this form.
rep=c("1","1","1","2","2","2","3","3","3")
trt=c("7","7","7","8","8","8","9","9","9")
y=c("34.55","65.88","34.66","45.66","34.55","32.09","38.99","33.444","35.67")
Thank you for your suggestion.