#' Base class for ordered lists
#'
List <- R6Class(
"List",
public = list(
lst = NULL,
initialize = function(lst = list()) {
self$lst <- unclass(as.list(lst))
},
add = function(item) {
self$set(self$size() + 1, item)
},
get = function(index) {
self$lst[[index]]
},
set = function(index, item) {
self$lst[[index]] <- item
invisible(self)
},
size = function() {
length(self$lst)
}
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.