Reorder a slide in a presentation.yaml
Usage
deck_move_slide(presentation, id, after = NULL, before = NULL, index = NULL)
Arguments
- presentation
Path to presentation.yaml.
- id
The slide's id.
- after, before, index
At most one of these controls the new
position: immediately after/before another slide's id, or a
0-based index. after/before naming id itself is an error
(there's no other copy of the slide to be relative to).
Value
The CLI result (invisibly).
Examples
if (FALSE) { # \dontrun{
# See deck_add_slide()'s example for setting up a scratch project_dir.
presentation <- file.path(project_dir, "presentation.yaml")
deck_move_slide(presentation, id = "new-slide", index = 0)
} # }