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

  • Home
  • SEARCH
  • 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 8995969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T23:41:26+00:00 2026-06-15T23:41:26+00:00

I have been learning R programming language for a month and have some difficulties

  • 0

I have been learning R programming language for a month and have some difficulties in lists and dataframes. I couldn’t figure out how to find the intersection between more than 2 lists. I created four lists , which contain name, gender, age, 3 favorite movies , Support to UN, birth day and month of immediate family member :

x<- list("Corinna Neubach", "female", 24, list("Film1","Film2","Film3"), TRUE,list("31.05",  "19.12"))
z<- list("Yasmin Ritschl","female", 21, list("Film6","Film7","Film8"), TRUE, list("20.03", "10.12"))
a<- list("Stefan Braun", "male", 23, list("Film6","Film7","Film8"),TRUE,list("25.06", "15.12"))
y<- list("Melissa Okay", "female", 23, list("Film3","Film4","Film5"), TRUE,list("31.05", "10.12"))

I would like to check, if there is any shared birthday or names in the four lists.
First I wrote a code with „Reduce“, but it doesnt give the solution which I want to have.
Then, I have tried it with intersect but I think there should be a simplier way to do that

intersect(x[[6]],y[[6]])
intersect(x[1],y[1])
intersect(x[[6]],z[[6]])
intersect(x[1],z[1])
intersect(y[[6]],z[[6]])
intersect(y[1],z[1])
intersect(x[[6]],z[[6]])
intersect(x[1],z[1])
intersect(a[[6]],x[[6]])
intersect(a[1],x[1])
intersect(a[[6]],z[[6]])
intersect(a[1],z[1])
intersect(a[[6]],y[[6]])
intersect(a[1],y[1])
  • 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-15T23:41:27+00:00Added an answer on June 15, 2026 at 11:41 pm

    First of all, I don’t think the single-person lists are the appropriate data structure for your task. They all have the same structure, this is an indicator that data.frame would be appropriate.

    While data.frames can contain lists inside their elements, your data suggests to translate the lists into tables of a normalized relational data base. You can map that to 2 or 3 data.frames in R:

    • the person data
    • The 3 favourite films: if they are ordered (1st, 2nd, 3rd choice), you can use data.frame colums of the person table for that. If not, pull them into an extra data.frame with columns person and film.
    • For the birth date of the relatives, I guess it is accidentally that your example data gives exactly 2 of them for each person. So pull that into another data.frame.

    For hunting duplicates, have a look at ? table.


    edit: wrt. the requirement to build a list: data.frames are lists in R:

    > a <- data.frame (person = "John Doe", gender = "female")
    > a
        person gender
    1 John Doe female
    > is.list (a)
    [1] TRUE
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been reading from the book The C Programming Language learning C, and
I have been learning functional programming and I come to idea, to assemble mathematical
I have been learning about Delegation and Data Sources for iOS programming and need
I have been learning python for some time now. While starting this learning python
I'm currently learning the fascinating J programming language, but one thing I have not
I have recently been learning F# and functional programming. One application I have found
I am very new to iOS Programming and have been learning for only a
I've been programming procedural code for quite some time, and recently I've been learning
I have been learning Objective-C as my first language and understand Classes, Objects, instances,
Do you recommend learning C++ using a template? Edit I have basic programming language

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.