Best practices for cataloging ad hoc analysis scripts?

In my work, I create many informal exploratory analysis scripts in R to try out ideas. Most of these are "single use," but sometimes I have trouble finding the right code months or years later when it turns out the approach I took is relevant again.

Beyond using a descriptive file names, are there any good practices I should adopt? What are good ways to improve the "searchability" of my code snippets, either at the time of creation or as a periodic "curation" step?

Are there good tools to help with this?

1 Like

I also would love a good answer to that!

For functions that I use regularly, it has worked out quite well to put them in packages, that's quite easy to create with {devtools}, and you can keep documentation and tests available with little effort. But of course a lot of exploratory scripts don't fit into functions.

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.