benmarwick / rrtools

rrtools: Tools for Writing Reproducible Research in R
Other
671 stars 85 forks source link

[enhancement] Use templates for standardized reporting guidelines #57

Closed wolass closed 4 years ago

wolass commented 6 years ago

Many scientific reports have specific structures.

Original articles, RCTs, literature reviews and case reports are distinctly different papers.

Whenever one would start writing - it is necessary to make a structure of a specific type. Moreover, there are multiple guidelines how to efficiently (and by standardized matter) write a specific report.

So let's say I would like to write a Case report in a medical journal. The http://www.equator-network.org/ page provides the guidelines on how to write various scientific manuscripts and which information needs to be in these reports. They also recommend the best set of guidelines for the job.

We find that for the case reports the CARE guidelines are recommended. http://www.equator-network.org/reporting-guidelines/care/ Therefore we would like to write a case report using these guidelines. They provide a set of tips and checklists while writing. But finding them and using them could be easier.

I have just started writing a package that is meant to be an extension to the rrtools by providing these guidelines as templates 'paper.Rmd' file.

There is, of course, a ton of work to be done to make all of these guidelines available.

Please let me know what you think - if this is useful, and if you see a method to simplify the template creation process by maybe scraping the equator webpage?

the package (with only one template right now) can be found here: https://github.com/wolass/reportingGuidelines

The only way to use it right now is to start a repository using rrtools and use_analysis(). After that the function reportingGuidelines::useGuideline("case") will replace the paper.Rmd file with a CARE_statement template.

The template has the tips and checklist items included in it - to provide a thorough reference while writing the report. So no need to lookup the EQUATOR webpage, download the templates yourself and get back to R. It is all in one place.

benmarwick commented 6 years ago

That is very interesting to see, thanks. It is nice to have some prompts and checklists to help to follow those guidelines (though they are not used in my field :( ) .

Have you considered the approach to 'document templates' that RStudio use? That could be another method to providing reporting guidelines templates. Maybe it's simpler? The main advantage seems to be that you can have your template appear in the 'New R Markdown' dialog, for what that's worth.

januz commented 5 years ago

I agree that if just the styling of the output file is of interest, document templates, e.g., from the rticles package, and corresponding citation styles are the way to go.

What I was wondering about was whether one could implement a more general templating approach for the whole directory structure and included files. So instead of having use_analysis() set a predefined structure, one could have use_template(template_name) and users could define their own templates for often used project structures (e.g., paper, analysis notebook, Shiny app, ...), with their individual directory structure and files (see RSuite for a similar approach: https://rsuite.io/RSuite_Tutorial.php?article=rsuite_templates.md)

benmarwick commented 5 years ago

Just taking another look at this, we really like the idea of a use_template(template_name) approach. However, it seems like that might require a major re-write, so we might come back to it in the future. Of course we would welcome discussion of a pull request!

benmarwick commented 4 years ago

I think we can add a note to the readme to invite the user to look into there. Not sure that rrtools is right place to provide these templates, seems like rticles or similar template pkg would be a better place