I have a list of over 600 files that I would like to extract the information from the file name and put it into the text file along with the information in the file itself.
name of file:
info in file:
0.015 120 50
0.12 121 52
0.23 119 53
0.4 122 59
I would like the file to look like this:
p01 male cond 1 loud 0.015 120 50
p01 male cond 1 loud 0.12 121 52
p01 male cond 1 loud 0.23 119 53
p01 male cond 1 loud 0.4 122 59
I used strsplit to extract the names from the file name but I do not know how to use the chunks from strsplit to put into a data file. PLEASE HELP!!! the code needs to be general enough to apply to the 600 files that I have that all have a similar name structure but different names and different file contents.