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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:47:38+00:00 2026-06-03T07:47:38+00:00

I have 2 datasets. A = 3085 rows, 1 column. B = 527 rows,

  • 0

I have 2 datasets.

A = 3085 rows, 1 column.
B = 527 rows, 1000 columns.

All values in both of these datasets are the names of shapefiles.

I would like to create a new list of A – B[,1]. A.k.a I would like to remove any values from A that appear in the first column of B.

I will eventually be looping this for all 1000 columns.

If anyone can help, it would be much appreciated.

Regards,

  • 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-03T07:47:39+00:00Added an answer on June 3, 2026 at 7:47 am

    If A and B are data.frames or matrices you can use such procedure

    A[!(A[,1] %in% B[,1]), 1]
    

    I just now realized fully your question. To loop on all columns of B you can use apply family function. This call will iterate each column of B as x parameter and will return list of length equal to the number of columns of B, each element of the list will be a vector of mismatched elements of A to corresponding column of B.

    apply(B, 2, function(x) A[!(A[,1] %in% x), 1])
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a bunch of datasets that are in SAS format. I would like
I have multiple datasets that I would like to combine into one. There is
Lets say I have 2 datasets: A and B, that have the same columns.
I have a master-details datasets: Order and Order items and both datasets are set
I have a query that UNION 's two somewhat similar datasets, but they both
Since silverlight does not have any support for DataSets/DataTables, what would be the best
I have several datasets i.e. matrices that have a 2 columns, one with a
I have 2 datasets ds1 and ds2 ds1 contains valid values used in ds2
I have 2 datasets ds1 and ds2 ds1 contains valid values used in ds2
i have two datasets and i need to compare these two datasets such that

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.