Although you have provided some more code, it's still not really a reprex I can work with. Why don't you create a dummy input / output dataframe using the tips in the reprex link and tell me what info you need to extract from it and we'll take it from there.
So provide me with some data frame code of a file as it is read, and the dataframe that is saved again after processing.