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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T00:39:58+00:00 2026-06-10T00:39:58+00:00

df1 day primer replicate count 011311 Arc b1 0 011311 Bdnf b1 0 011311

  • 0

df1

   day  primer replicate count
011311     Arc        b1     0
011311    Bdnf        b1     0
011311    Bves        b1     0
011311     Crh        b1     0
011311    Egr1        b1     0

I have the following df1, and want to exclude rows in df2 which are equal to the df1’s primer and replicate values.

df2

primer exptname concentrate timepoints replicate  day     realConc
Acan      0hr        55mM          0        b1 011311 0.0002771494
Acan      0hr        55mM         20        b1 011311 0.0061298654
Acan      0hr        55mM         40        b1 011311 0.0015750373
Arc       0hr        55mM          0        b1 011311 0.0010109867
Arc       0hr        55mM         20        b1 011311 0.0035939088
Arc       0hr        55mM         40        b1 011311 0.0133760938

So I guess my question is that I don’t know how to do a 2 way match. And then exclude those values (in this case rows)

I want this

new_df

primer exptname concentrate timepoints replicate  day     realConc
Acan      0hr        55mM          0        b1 011311 0.0002771494
Acan      0hr        55mM         20        b1 011311 0.0061298654
Acan      0hr        55mM         40        b1 011311 0.0015750373

I was thinking something like:

new_df <- df2[!which(match(paste(df2$primer,df$replicate),paste(df1$primer,df$replicate))),]

obviously not working though

  • 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-10T00:39:59+00:00Added an answer on June 10, 2026 at 12:39 am
    exclude<-!(paste(df2$primer,df2$replicate,sep='~')%in%paste(df1$primer,df1$replicate,sep='~'))
    df2[exclude,]
    #  primer exptname concentrate timepoints replicate   day     realConc
    #1   Acan      0hr        55mM          0        b1 11311 0.0002771494
    #2   Acan      0hr        55mM         20        b1 11311 0.0061298654
    #3   Acan      0hr        55mM         40        b1 11311 0.0015750373
    

    if you dont like to use paste you could also use

    exclude<-!((df2$primer%in%df1$primer)&(df2$replicate%in%df1$replicate))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two data frames that look like something like the following: df1 <-
I have the data frame df1 = data.frame(Site=c(rep(A,5),rep(B,7)),Species=sample(1:100, size=12)) and want to filter the
have the following data frames: id1<-c(1,2,3,4,5) spent<-c(10,20,30,40,50) id2<-c(1,3,4) x<-c(1,2,2) df1<-data.frame(id1,spent) df2<-data.frame(id2,x) I need to
I have 2 separate dataframes df1 ID Name loq 1 a 1.2 1 b
I am working with data.frames that have very similar names (df1, df2,.. df7). Because
I have many data.frames, for example: df1 = data.frame(names=c('a','b','c','c','d'),data1=c(1,2,3,4,5)) df2 = data.frame(names=c('a','e','e','c','c','d'),data2=c(1,2,3,4,5,6)) df3 =
I have two data.frames. For examples sake let's say they look like this: df1
In Python, I want to count the number of lines in a file xh-2.txt
I have two dataframes df1 = data.frame(Sites=c(A,B,C),total=c(12,6,35)) df2 = data.frame(Site.1=c(A,A,B),Site.2=c(B,C,C), Score=c(60,70,80)) I need to
I have two data.frames as follows: df1 <- data.frame(A=c(lee,eeu,ees), B=c(lee,ggu,1su), C=c(1,1,1) A B C

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.