[1] "my_a11ytable <-\n a11ytables::create_a11ytable(\n tab_titles = c(\"Cover\", \"Contents\", \"Notes\", \"Table_1\", \"Table_2\"),\n sheet_types = c(\"cover\", \"contents\", \"notes\", \"tables\", \"tables\"),\n sheet_titles = c(\n \"The 'a11ytables' Demo Workbook\",\n \"Table of contents\",\n \"Notes\",\n \"Table 1: First Example Sheet\",\n \"Table 2: Second Example Sheet\"\n ),\n blank_cells = c(\n rep(NA_character_, 3),\n \"Blank cells indicate that there's no note in that row.\",\n NA_character_\n ),\n custom_rows = list(\n NA_character_,\n \"A custom row in the Contents sheet.\",\n NA_character_,\n c(\n \"First custom row for Table 1.\",\n \"A second custom row [with a hyperlink.](https://co-analysis.github.io/a11ytables/)\"\n ),\n \"A custom row for Table 2\"\n ),\n sources = c(\n rep(NA_character_, 3),\n \"[The Source Material, 2024](https://co-analysis.github.io/a11ytables/)\",\n \"The Source Material, 2024\"\n ),\n tables = list(cover_list, contents_df, notes_df, table_1_df, table_2_df)\n )"
[1] "cover_list <- list(\n \"Section 1\" = c(\"First row of Section 1.\", \"Second row of Section 1.\"),\n \"Section 2\" = \"The only row of Section 2.\",\n \"Section 3\" = c(\n \"[Website](https://co-analysis.github.io/a11ytables/)\",\n \"[Email address](mailto:fake.address@a11ytables.com)\"\n )\n)\n\ncontents_df <- data.frame(\n \"Sheet name\" = c(\"Notes\", \"Table 1\", \"Table 2\"),\n \"Sheet title\" = c(\n \"Notes used in this workbook\",\n \"First Example Sheet\",\n \"Second Example Sheet\"\n ),\n check.names = FALSE\n)\n\nnotes_df <- data.frame(\n \"Note number\" = paste(\"[note \", 1:2, \"]\"),\n \"Note text\" = c(\"First note.\", \"Second note.\"),\n check.names = FALSE\n)\n\ntable_1_df <- data.frame(\n Category = LETTERS[1:10],\n Numeric = 1:10,\n \"Numeric suppressed\" = c(1:4, \"[c]\", 6:9, \"[x]\"),\n \"Numeric thousands\" = abs(round(rnorm(10), 4) * 1e5),\n \"Numeric decimal\" = abs(round(rnorm(10), 5)),\n \"A column with a long name\" = 1:10,\n Notes = c(\"[note 1]\", rep(NA_character_, 4), \"[note 2]\", rep(NA_character_, 4)),\n check.names = FALSE\n)\n\ntable_2_df <- data.frame(Category = LETTERS[1:10], Numeric = 1:10)"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.