as.listalike | R Documentation |
Converts a vector to a list with the same dimensions as a given list.
as.listalike(vec, list_wannabe)
vec |
A vector. |
list_wannabe |
A list with the desired dimensions. |
A list with the same dimensions as list_wannabe
, and the same elements as vec
in the same order.
vec <- 1:10
list_wannabe <- list(a = 1:3, b = 4:6, c = 7:10)
as.listalike(vec, list_wannabe)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.