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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:09:43+00:00 2026-05-31T08:09:43+00:00

Is there a set of R functions analogous to intersect , union , etc.

  • 0

Is there a set of R functions analogous to intersect, union, etc. which act on vectors of coordinates? Take a two collections of locations in N dimensions, each of which could be viewed as N-row by M-location array, and find the common locations (i.e. columns), and so on. I suppose this could be done with a couple *apply lines to compare every column in one array to the columns of the other, but was hoping for something faster or neater.

  • 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-05-31T08:09:45+00:00Added an answer on May 31, 2026 at 8:09 am

    There is a ‘sets’ package, but the simplest solution would be to use the base set operations: union, , intersect , and setdiff on the results of paste with a separator such as "_". If these are represented as ‘numeric” values you may need to make decsions about what really means “equality” and for that some round-ing or trunc-cation may be needed.

    Another thought is that implementation might be more self-documenting in the columnwise arrangement you describe to use the “plyr” function:colwise. I’m not a dedicated user of plyr methods, but this appears to be how it might start:

    colpastefn <- colwise( function(...){paste(... , sep="_") )
    

    Although the description of the function suggests it should work as a standalone function on a dataframe, all of the illustrated uses are with ddply.

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

Sidebar

Related Questions

Is there a set of functions that give you the file and/or the folder
Is there a class or set of functions built into the .NET Framework (3.5+)
Is there a function in the C Library under Linux which can set the
Let's say there is a graph and some set of functions like: create-node ::
I'm looking to create a set of functions which all implementations of a certain
I have a simulation program which repeats a set of functions in a specific
In ASP.NET, is there any reason not to make a set of functions that
Is there a way to set up a function that will get the user
Is there a way to set up default function arguments with variables in them
Is there any way how to set std::setw manipulator (or its function width )

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.