Once lists start to get a bit nested I struggle a bit more with them (I think that others may struggle with nested lists too). I have a list of lists that I want to put together in a certain format. Here’s an example of the list:
ms2 <- list(list(" question", c(" thin", " thick"), " one", c(" simple",
" big")), list(" infer", " theme", c(" strategy", " guess", " inform"
), c(" big", " idea", " feel", " one")), list(
"synthesi", c(" predict", " thin", " thick", " parts", " visual",
" determin", " schema", " connect", " background", " knowledge",
" strategy", " infer", " question", " importance"), NA_character_,
c(" things", " picture")), list(" visual", " strategy", " picture",
NA_character_), list(" question", " wonder", c(" them", " one"
), NA_character_), list(" predict", NA_character_, c(" think",
" guess", " wonder"), NA_character_))
I want to combine the first three and last three lists together to get 2 lists of 4 vectors each as in this below (this is just for the first list).
list(c("question", "infer", "synthesi", "visual"),
c("thin", "thick", "theme", "predict", "parts",
"visual", "determin", "schema", "connect", "backgraound",
"knowledge", "strategy", "infer", "question", "importance",
"strategy"),
c("one", "strategy", "guess", "inform", "picture"),
c("simple", "big", "idea", "feel", "one", "things", "picture"))
What about something like this:
Note that it does not match exactly the expected output you gave. Maybe you can help clarify these differences?