Nothing
remove_from_chapter_structure_if_n_below <-
function(chapter_structure,
n_variable_name = ".n",
hide_chunk_if_n_below = 10) {
if (is.null(chapter_structure[[n_variable_name]])) {
cli::cli_abort("{.arg n_variable_name} does not exist in {.arg chapter_structure}: {.arg {n_variable_name}}.")
}
vctrs::vec_slice(
chapter_structure,
is.na(as.character(chapter_structure[[".variable_name_dep"]])) | # Introduction chapter or ..
(!is.na(chapter_structure[[n_variable_name]]) &
chapter_structure[[n_variable_name]] >= hide_chunk_if_n_below)
) |>
dplyr::grouped_df(vars = dplyr::group_vars(chapter_structure))
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.