Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertions and conditional text in RMarkdown documents #6

Open
MattForshaw opened this issue Apr 6, 2019 · 1 comment
Open

Assertions and conditional text in RMarkdown documents #6

MattForshaw opened this issue Apr 6, 2019 · 1 comment

Comments

@MattForshaw
Copy link
Collaborator

Hi Philip,

Based on our conversations at the ANNE conference, I thought we could add an additional exercise to cover...

  • Adding assertions within RMarkdown documents to prevent a drift between narrative and data (e.g. when a year-on-year increase becomes a decrease).
  • Constructing text in a narrative conditional on the data.

I propose this become Exercise 8, rather than making Exercise 5 more complex.

Welcome your thoughts before I embark on this.

Best wishes,
Matt

@philipdarke
Copy link
Owner

That would be a good addition, using assertthat? To keep it simple we could add a constant pv_previous = 5000000 say and compare it to the calculated pv_central - the narrative could then be "The present value is higher/lower than in our previous report"?

Agree we should add as exercise 8. Exercise 9 could be documentation with roxygen2 - I must get around to that at some point...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants