number_unnamed | R Documentation |
1
JavaScript starts at 0
, but R starts at 1
.
This means unnamed lists and vectors are indexed starting at
0
in listviewer widgets. This little helper function
tries to resolve the disconnect by assigning sequential numbers
starting at 1
to names for unnamed lists
and vectors
.
Please note though that using number_unnamed
will potentially
cause difficulties serializing back and forth between JavaScript and R.
number_unnamed(l)
l |
|
library(listviewer)
jsonedit(
number_unnamed(list(x=list(letters[1:3])))
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.