Skip to content

Commit

Permalink
Try again
Browse files Browse the repository at this point in the history
  • Loading branch information
mine-cetinkaya-rundel committed Dec 5, 2024
1 parent bc4ad20 commit 10edbcc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"hash": "3dfb38dc0a5395090ad027f768719d13",
"hash": "07f46acc2c48b1cd4f3194495d054d01",
"result": {
"markdown": "---\ntitle: \"Side-by-side tables\"\ndate: \"2022-06-28\"\ncategories: [tables]\nimage: \"featured.png\"\nimage-alt: \"hello\"\n---\n\n\n## `layout-ncol`\n\nUse the `layout-ncol` chunk option to organize output in columns, e.g., `layout-ncol: 2` for two tables side-by-side.\n\n\n::: {.cell layout-ncol=\"2\" tbl-cap='Two tables' tbl-subcap='[\"mtcars\",\"Just cars\"]'}\n\n````{.cell-code}\n```{{r}}\n#| tbl-cap: Two tables\n#| tbl-subcap: [\"mtcars\", \"Just cars\"]\n#| layout-ncol: 2\n\nlibrary(knitr)\n\n# table on the left\nkable(head(mtcars[, 1:3]))\n\n# table on the right\nkable(head(cars))\n```\n````\n\n::: {.cell-output-display}\n| | mpg| cyl| disp|\n|:-----------------|----:|---:|----:|\n|Mazda RX4 | 21.0| 6| 160|\n|Mazda RX4 Wag | 21.0| 6| 160|\n|Datsun 710 | 22.8| 4| 108|\n|Hornet 4 Drive | 21.4| 6| 258|\n|Hornet Sportabout | 18.7| 8| 360|\n|Valiant | 18.1| 6| 225|\n\n\n\n| speed| dist|\n|-----:|----:|\n| 4| 2|\n| 4| 10|\n| 7| 4|\n| 7| 22|\n| 8| 16|\n| 9| 10|\n:::\n:::\n\n\n## Learn more\n\n[Options for tables produced by executable code cells](https://quarto.org/docs/authoring/tables.html#computations)\n\n",
"engine": "knitr",
"markdown": "---\ntitle: \"Side-by-side tables\"\ndate: \"2022-06-28\"\ncategories: [tables]\nimage: \"featured.png\"\nimage-alt: \"Two tables side by side. On the left is the first six rows and the first three columns of the mtcars dataset. On the right is the first six rows and all two columns of the cars dataset.\"\n---\n\n\n\n## `layout-ncol`\n\nUse the `layout-ncol` chunk option to organize output in columns, e.g., `layout-ncol: 2` for two tables side-by-side.\n\n\n\n::: {#tbl-label .cell layout-ncol=\"2\" tbl-cap='Two tables' tbl-subcap='[\"mtcars\",\"Just cars\"]'}\n\n````{.cell-code}\n```{{r}}\n#| label: tbl-label\n#| tbl-cap: Two tables\n#| tbl-subcap: [\"mtcars\", \"Just cars\"]\n#| layout-ncol: 2\n\nlibrary(knitr)\n\n# table on the left\nkable(head(mtcars[, 1:3]))\n\n# table on the right\nkable(head(cars))\n```\n````\n\n::: {.cell-output-display}\n\n\n| | mpg| cyl| disp|\n|:-----------------|----:|---:|----:|\n|Mazda RX4 | 21.0| 6| 160|\n|Mazda RX4 Wag | 21.0| 6| 160|\n|Datsun 710 | 22.8| 4| 108|\n|Hornet 4 Drive | 21.4| 6| 258|\n|Hornet Sportabout | 18.7| 8| 360|\n|Valiant | 18.1| 6| 225|\n\n\n\n| speed| dist|\n|-----:|----:|\n| 4| 2|\n| 4| 10|\n| 7| 4|\n| 7| 22|\n| 8| 16|\n| 9| 10|\n\n\n:::\n:::\n\n\n\n## Learn more\n\n[Options for tables produced by executable code cells](https://quarto.org/docs/authoring/tables.html#computations)\n",
"supporting": [],
"filters": [
"rmarkdown/pagebreak.lua"
Expand Down
2 changes: 1 addition & 1 deletion posts/01-side-by-side-tables/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "Side-by-side tables"
date: "2022-06-28"
categories: [tables]
image: "featured.png"
image-alt: "Two tables side by side. On the left is the first six rows and first three columns of the mtcars dataset. On the right is the first six rows and all two columns of the cars dataset."
image-alt: "Two tables side by side. On the left is the first six rows and the first three columns of the mtcars dataset. On the right is the first six rows and all two columns of the cars dataset."
---

## `layout-ncol`
Expand Down

0 comments on commit 10edbcc

Please sign in to comment.