Package for capturing input metadata?

I would like to capture input-file metadata, and include it with the reports I'm generating. That is, my scripts typically read over a dozen data files, mostly .xlsx files but also .csv, .tsv, .yaml and .txt. I envision a set of functions which wrap around readxl, read_csv etc, and capture the full path of the file name, the file-owner, and the modification-time, all put in a tibble. I'd write that metadata with the rest of my output - usually as a worksheet in an Excel WB.

Is there a CRAN package which does this? Or is there some better way to approach the problem?

I do not know of such a package, but the other day I needed to do something similar, and it was pretty straightforward to use do.call() and file.info() on the list of files, then store all the information in a data.frame. I don’t remember if file.info() includes file owner or not, but I think it has mod time.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.