Description Usage Arguments Examples
Accumulated items are lagged by one trial so that the resulting item list represents the items that had been discovered up to that trial.
1 | accumulate(items, default = NA, ignore = NA)
|
items |
The vector of items to accumulate in order. |
default |
The default items. Optional. Defaults to NA. |
ignore |
Item to ignore during accumulation. Optional. |
1 2 3 4 5 6 7 8 9 10 | items <- c("a", "b", "b", "c")
accumulate(items)
# list(NA, c("a"), c("a", "b"), c("a", "b"))
accumulate(items, default = "a")
# list(c("a"), c("a"), c("a", "b"), c("a", "b"))
accumulate(items, ignore = "b")
# list(c("a"), c("a"), c("a"), c("a"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.