-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path04-results.qmd
More file actions
27 lines (16 loc) · 2.37 KB
/
Copy path04-results.qmd
File metadata and controls
27 lines (16 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Results
<br>
This section demonstrates how results generated by your analysis can be integrated into the narrative. It showcases the use of Quarto's `embed` feature to include outputs from separate analysis scripts.
Remember that the dynamic document's (`.qmd`) primary role is to present the narrative and key findings. Complex or exploratory analyses are best kept in separate scripts within the `Scripts/` directory. This separation keeps the main narrative document focused and clean.
The `Scripts/AnalysisScripts/data_visualization.qmd` file contains example R code for generating plots and tables. Below, we embed the outputs from specific code chunks within that script directly into this narrative.
I've included two examples of how to include results from your analytic scripts into your story below: @fig-pressure and @tbl-diamonds. These are generated by running the code in `Scripts/AnalysisScripts/data_visualization.qmd`.
{{< embed /Scripts/AnalysisScripts/data_visualization.qmd#fig-pressure >}}
{{< embed /Scripts/AnalysisScripts/data_visualization.qmd#tbl-diamonds >}}
To learn how it was done, follow the code in `Scripts/AnalysisScripts/data_visualization.qmd`! Please take note that we are only referring to the *output* (the figure and table) generated by the code chunks labeled `fig-pressure` and `tbl-diamonds` in that script. The underlying R code is executed when that script is run or when this document embeds its output, ensuring reproducibility.
This approach allows you to develop complex analyses in dedicated script files while selectively presenting the most relevant results in your main article narrative.
> To learn more about the embedding process discussed here, see the [Quarto embedding documentation](https://quarto.org/docs/authoring/notebook-embed.html).
:::: {.content-visible unless-format="pdf"}
::: callout-tip
It should be noticed that the [rendered PDF copy of this article](https://github.com/phdpablo/article-template/blob/gh-pages/ARTE.pdf) does not include the video that appears on the website's homepage, as well as this tip. Our use of the markup block `::: {.content-visible unless-format="pdf"}:::` is the cause of this. You can leave the PDF as is to submit it to the journal while displaying extra components in the dynamic document. Learn more at the [Quarto conditional content website](https://quarto.org/docs/authoring/conditional.html).
:::
::::