A general-purpose tool for dynamic report generation in R