extract_element_at | R Documentation |
Extracting the element from each slot of a list. It behaves like lapply
, e.g. lapply(x, tail, n = 1
is similar to last_element(x)
, but the latter one will be much faster.
For the speed, extract_element_at(x, 1)
is slightly slower than first_element
.
first_element(x, invert = FALSE) last_element(x, invert = FALSE) extract_element_at(x, invert = FALSE)
x |
A list like object. |
invert |
A logical scalar specifying whether extract element except the selected one, |
It also works with GRangesList and List.
A list containing the selected element from the each slot in the list.
Cheuk-Ting Law
x <- list(c(1:10), c(5:20)) first_element(x) first_element(x, invert = TRUE) last_element(x) extract_element_at(x, 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.