I have several .txt files in a folder.
I want to read all the files, so, I used > files = list.files()
But how can I merge all text files in to one file ? ( There each text files have not same length, so I used readlines )
Please tell me how to get all text files in one file and there have one column with its source file name.
Example - ex01.txt ( three column) some column have NA values ex02.txt ( Five colunm) some column have NA values ex03.txt ( Six colunm) some column have NA values ex04.txt ( Eight column) some column have NA values
Need output :
Those Eight column + one additional column (this column will contain file name)
ex01.txt
ex01.txt
ex02.txt
ex02.txt
ex03.txt
ex03.txt