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 8709015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:15:49+00:00 2026-06-13T04:15:49+00:00

This might be an easy question but i still need some help for using

  • 0

This might be an easy question but i still need some help for using R.

I have a data.frame (main_data), lets say..

NAMES   AGE     LOC
Jyo     23      Hyd
Abid    27      Kar
Ras     24      Pun
Poo     25      Goa
Sus     28      Kar

I wish to remove a few rows based on a list of names. So lets say I have another list of table as follows:

NAMES_list
Jyo
Ras
Poo

So based on this list, if any of the names match to my above “main_data” table, then I would like to remove the whole row contianing them, so the result should be as follows

NAMES   AGE     LOC
Abid    27      Kar
Sus     28      Kar

Can anyone help me how to achive this using R?
Thanks in advance.. 🙂

  • 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-13T04:15:50+00:00Added an answer on June 13, 2026 at 4:15 am

    Use %in%:

    main_data2 <- main_data[ ! main_data$NAMES %in% NAMES_list, ]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This might seem an easy question for some, but I am struggling with it.
This might seem like a very easy question for some of you folks, but
I know this might be an easy question but still: I got a dropdown
Sorry, I am still new using jquery so this might be an easy question.
Hie guys i am still learning cakephp so this question might be easy but
It might be an easy and simple question but I still have a little
this might be an easy question but i have a notification that when clicked
This might be an easy question, but I'd like your help with this. I
i know this question might be too easy, but i have no idea how
This might be a quick and easy question, but I was still unable to

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.