Best Practices for Organizing RMarkdown Projects

As a poll:

  • Reordering code chunks
  • Running external scripts
  • Hardcoding a few pesky values
  • Doing something else
0 voters

I run an external script, and it works pretty much as you'd expect:

  1. Use the external script for all substantive analysis and to save a bunch of tables to .rdata or .rds.
  2. Use the markdown doc to read the tables in and makes graphs, tables, etc.

Not sure if that's heretical as far as reproducible research norms go, but it seems transparent enough to me and it makes my code easier to read and maintain.

The ref.label option @nick pointed out looks handy, but I guess I still prefer separate docs rather than messing with analytical and publishing concerns all at once.

6 Likes