I have the following text file, it contains several chunk of table. Each chunk is separated by white space.
GENERALIZED BORN:
Complex Energy Terms
Frame #,BOND,ANGLE
0,6603.0521,7264
1,7434.9885,7602
Receptor Energy Terms
Frame #,BOND,ANGLE
0,6140.6338,5383.1241
1,6885.2965,5653.6637
Ligand Energy Terms
Frame #,BOND,ANGLE
0,462.4183,1881.428
1,549.692,1949.0482
How can I use R to parse this single text file into list of three data frames, or tibbles?
I tried this but failed:
library(readr)
readr::read_lines_chunked("myfile.txt", skip =1, chunk_size = 4)
Because readr::read_lines_chunked can't recognized the white space separator between chunks.