strip_prefix | R Documentation |
Episode order for Carpentries lessons originally used a strategy of prefixing files by a two-digit number to force a specific order by filename. This function will strip these numbers from the filename and set the schedule according to the original order.
strip_prefix(path = ".", write = FALSE)
path |
the path to the lesson (defaults to the current working directory) |
write |
defaults to |
when write = TRUE
, the modified list of episodes. When
write = FALSE
, the modified call is returned.
git will recognise this as deleting a file and then adding a new file
in the stage. If you run git add
, it should recognise that it is a rename.
create_episode()
for creating new episodes, move_episode()
for
moving individual episodes around.
if (FALSE) {
strip_prefix() # test if the function is doing what you want it to do
strip_prefix(write = TRUE) # rewrite the episode names
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.