Hi All,
I have a raw text file that I need to read which doesn't have any delimiter or spaces between two columns. I want to read each line such that I can make a data frame that has rows and column equal to the number of rows and column in the text file.
Data
test <- read.table(text = "ABC
DEF123
DEF123-4
DEF12345.PQR
..................................
..................................
..................................
.............AAAAAAAA.............
............AAAAAAAAAA............
............AAAAAAAAAA............
...........AAAAAAAAAAAA...........
..........AAAAAAAAAAAAAA..........
..........AAAAAAAAAAAAAA..........
.........AAAAAAAAAAAAAAAA.........
.........AAAAAAAAAAAAAAAA.........
..................................
..................................")
Above data is in a text file and when I read it using read.table()
or read.delim()
, I get same 17 rows as above but 1 column, but I want to have 17 rows but with 34 columns with each cell holding each of the value above.
Any suggestions how I can solve this issue?
Thanks.