Skip to content

clarifications about Rmd section files#20

Open
KevCaz wants to merge 1 commit into
AtlanticR:masterfrom
inSileco:master
Open

clarifications about Rmd section files#20
KevCaz wants to merge 1 commit into
AtlanticR:masterfrom
inSileco:master

Conversation

@KevCaz

@KevCaz KevCaz commented Feb 3, 2021

Copy link
Copy Markdown

I created this PR for illustrative purposes only, no need to merge it.

First one clarification about how the report will be customized. The application will insert code chunks using the option child in the main/generic document. The main document should include INTRO + END (I merge the two documents in this PR). Therefore, there is no need to repeat the first code chunks, because everything will be combined into a single Rmd document before rendering it. So you can remove the header and the first code chunks in all Rmd but the main one (I did for SearchPEZ/code/report_pt2_SAR_dist_crithab_EN.Rmd as an example)!

Another important comment is that you are adding caption below manually below code chunks that generate figure I would recommend using the code chunk option fig.cap instead, I did it for the 1st figure in SearchPEZ/code/report_pt1_generic_intro_EN.Rmd (l.181). Note that kable() also allow you to add caption to tables. This will number figures and tables properly, irrespective of the number of sections added.

Two tiny details :

  1. if include = FALSE is used then no need for echo = FALSE, see this blog post.

  2. using rm(list=ls(all=TRUE)) may be problematic here, and I would recommend against using this for the report. This should rather be part of the guidelines, i.e. the user should be aware that the objects in its R session may interfere with the generation of the report. That said, I will probably generate the report in a different R session, so anyway no need for this!

@gpuncher

gpuncher commented Feb 3, 2021

Copy link
Copy Markdown
Collaborator

Thank you for this Kevin. At the moment we are still making modifications to each of the sub sections, so I will keep headers on those for now until everything is polished, then I will remove all unnecessary scripts. Great suggestion for the figure captions. I didn't know about this and was worried about the figure numbers. Happy to hear about the automated numbering. Makes sense.

@KevCaz

KevCaz commented Feb 3, 2021

Copy link
Copy Markdown
Author

I will keep headers on those for now until everything is polished

Makes sense! Let's keep this PR open in the meanwhile, so I can keep editing it if necessary.

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

Successfully merging this pull request may close these issues.

2 participants