Last active
July 24, 2023 16:21
-
-
Save erikerhardt/5fedcba08c57a96dc87d0b6acd785163 to your computer and use it in GitHub Desktop.
quarto_table_figure_captions_template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://quarto.org/docs/authoring/tables.html | |
```{r} | |
#| label: tbl-example | |
#| tbl-cap: "Example caption can | |
#| continue on the next line" | |
#| tbl-subcap: | |
#| - "Cars" | |
#| - "Pressure" | |
#| layout-ncol: 2 | |
#| echo: fenced | |
library(knitr) | |
kable(head(cars)) | |
kable(head(pressure)) | |
``` | |
# https://quarto.org/docs/authoring/tables.html | |
```{r} | |
#| label: tbl-example | |
#| tbl-cap: "Example caption can | |
#| continue on the next line" | |
#| tbl-subcap: true # empty (a), (b) labels | |
#| layout-ncol: 2 | |
#| echo: fenced | |
library(knitr) | |
kable(head(cars)) | |
kable(head(pressure)) | |
``` | |
```{r} | |
#| label: fig-PNC-fig1_15 | |
#| fig-cap: "Histograms of daily KWH data for different time periods. From left | |
#| to right, the data are for the periods October 17-December 5, 1993; December 6, | |
#| 1993-January 24, 1994; January 25-March 15, 1994; and March 16-May 6, 1994." | |
dat_elece <- | |
dat_elece | |
p <- ggplot(data = dat_elece, aes(x = KWH)) | |
p <- p + geom_histogram(boundary = 0, binwidth = 5) | |
p <- p + coord_flip() | |
p <- p + facet_grid(. ~ period) | |
p | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment