リストが少しネストされ始めると、私はそれらにもう少し苦労します(ネストされたリストにも苦労する人もいると思います)。特定の形式でまとめたいリストのリストがあります。リストの例を次に示します。
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_))
以下のように、最初の 3 つと最後の 3 つのリストを組み合わせて、それぞれ 4 つのベクトルの 2 つのリストを取得したいと考えています (これは最初のリストのみです)。
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"))