pluck_depth | R Documentation |
The depth of a vector is how many levels that you can index/pluck into it.
pluck_depth()
was previously called vec_depth()
.
pluck_depth(x, is_node = NULL)
x |
A vector |
is_node |
Optionally override the default criteria for determine an
element can be recursed within. The default matches the behaviour of
|
An integer.
x <- list(
list(),
list(list()),
list(list(list(1)))
)
pluck_depth(x)
x |> map_int(pluck_depth)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.