Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8188259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:50:49+00:00 2026-06-07T02:50:49+00:00

Once lists start to get a bit nested I struggle a bit more with

  • 0

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"))
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T02:50:52+00:00Added an answer on June 7, 2026 at 2:50 am

    What about something like this:

    slice.it <- function(i,x) {
       slice <- lapply(x, `[[`, i)
       words <- unlist(slice)
       words <- words[!is.na(words)]
    }
    
    lapply(1:4, slice.it, ms2[1:3])
    # [[1]]
    # [1] " question" " infer"    "synthesi" 
    
    # [[2]]
    #  [1] " thin"       " thick"      " theme"      " predict"    " thin"      
    #  [6] " thick"      " parts"      " visual"     " determin"   " schema"    
    # [11] " connect"    " background" " knowledge"  " strategy"   " infer"     
    # [16] " question"   " importance"
    
    # [[3]]
    # [1] " one"      " strategy" " guess"    " inform"  
    
    # [[4]]
    # [1] " simple"  " big"     " big"     " idea"    " feel"    " one"     " things" 
    # [8] " picture"
    

    Note that it does not match exactly the expected output you gave. Maybe you can help clarify these differences?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using VS2008, and I have a project that will not start when I
Once again, lists are boggling my mind. <div id=headbottom> <ul id=headnavbutton> <li id=button1 class=headnavbutton></li>
I have created a form with a dropdown list for 'Region'. Once the form
I would like to append append an item more than once. e.g listA =
Once upon a time I was thought by more advanced web developers (gee, when
I have a home page that has several independent dynamic parts. The parts consist
I have a website project. It has assembly references to external DLLs that we
In my app I have a bit where the user can take a photo
After getting user authenticated with oauth2, i got the token. so how that get
I have a backgorund thread that extends AsyncTask and which I use in activity

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.