Description Usage Arguments Examples
This series of functions allows you to manipulate items in a checklist more intuitively and conveniently than using cl_set. They are designed to focus on manipulating a single task at a time. If you need to manipultate several items at once, consider using cl_set with a character vector as the 'tasks' argument and a logical vector as the 'completed' argument
1 2 3 4 5 6 7 8 9 | cl_add(cl, text)
cl_edit(cl, at_items, text)
cl_complete(cl, at_items)
cl_uncomplete(cl, at_items)
cl_remove(cl, at_items)
|
cl |
A checklist object |
text |
A String or character vector containing text to add or edit |
at_items |
An Integer or Integer vector dectermining where to edit, complete, uncomplete, or remove items |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | # create a checklist
cl <- cl_create()
# add a few items
cl_add(cl, "item 1")
cl_add(cl, "item 2")
cl_add(cl, "item 3")
# edit the second item
cl_edit(cl, 2, "update item 2")
# complete the second item
cl_complete(cl, 2)
# uncomplete the second item
cl_uncomplete(cl, 2)
# remove the second item
cl_remove(cl, 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.