`source` function with progress bar and caching feature ?

I have started to work on a wrapper around source that saves created variables in the project folder as RDS and optionally read them instead of reexecuting the code, it would come with a naïve progress bar that would move by step or 1/n where n is either the number of calls in the sourced time or the number or variables to read from file. The estimated time would be the last time it was executed.

I have looked around for something similar and didn't find it but it occurred to me I should ask here before moving forward, do you know any package providing such or similar features ?

Do you know upfront the number of files you are going to read (and maybe also their names)? If you do, how about using something like a_ply, that has a built in progress bar (see the .progress argument --- it's a text style one but I find it useful, as it also shows the actual percentage). In the case of a_ply it gets an array, e.g. with the names of files to be loaded, runs a function that you specify on each (e.g. loadRDS), and updates the progress bar on each iteration. That's the simplest "of the top of my head" solution that comes to mind, I may be able to think of other things along this line if that's not sufficient.

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.