set_dropdown | R Documentation |
Set the order of items in a dropdown menu
set_dropdown(path = ".", order = NULL, write = FALSE, folder)
set_episodes(path = ".", order = NULL, write = FALSE)
set_learners(path = ".", order = NULL, write = FALSE)
set_instructors(path = ".", order = NULL, write = FALSE)
set_profiles(path = ".", order = NULL, write = FALSE)
path |
path to the lesson. Defaults to the current directory. |
order |
the files in the order presented (with extension) |
write |
if |
folder |
one of four folders that sandpaper recognises where the files
listed in |
tmp <- tempfile()
create_lesson(tmp, "test lesson", open = FALSE, rmd = FALSE)
# Change the title and License
set_config(c(title = "Absolutely Free Lesson", license = "CC0"),
path = tmp,
write = TRUE
)
create_episode("using-R", path = tmp, open = FALSE)
print(sched <- get_episodes(tmp))
# reverse the schedule
set_episodes(tmp, order = rev(sched))
# write it
set_episodes(tmp, order = rev(sched), write = TRUE)
# see it
get_episodes(tmp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.