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

The Archive Base Latest Questions

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

df primer exptname concentrate timepoints replicate day realConc Acan 0hr 55mM 0 b1 011311

  • 0

df

 primer exptname concentrate timepoints replicate    day     realConc
    Acan      0hr        55mM          0        b1 011311 0.0002771494
    Actb      0hr        55mM          0        b1 011311 0.0061298654
 Atf7ip2      0hr        55mM          0        b1 011311 0.0015750373
  Atp2c1      0hr        55mM          0        b1 011311 0.0010109867
   Casp6      0hr        55mM          0        b1 011311 0.0035939088
 Col10a1      0hr        55mM          0        b1 011311 0.0133760938
    Acan      0hr        55mM          0        b1 011311 0.0002771494
    Actb      0hr        55mM          0        b1 011311 0.0061298654
 Atf7ip2      0hr        55mM          0        b1 011311 0.0015750373
  Atp2c1      0hr        55mM          0        b1 011311 0.0010109867
   Casp6      0hr        55mM          0        b1 011311 0.0035939088
 Col10a1      0hr        55mM          0        b1 011311 0.0133760938

i Have character vector:

 ges <- c('Acan','Casp6')

I only want rows where $primer == ges

I’ve tried

df[df$primer == ges,]

but it only returns the first rows which equals these two characters as opposed to all rows in the data frame which equal this

I feel like this is ridiculously simple but I’m messing up somewhere basic

Help a brother out

  • 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:33:27+00:00Added an answer on June 10, 2026 at 12:33 am

    == will do element by element checking of equality. Vector recycling comes into play here; it will check the first element of primer against the first element of ges, the second element of primer against the second element of ges, the third element of primer against the first element of ges (due to the recycling) and so on and so forth. What you actually want is to use the %in% operator to check if the elements of primer are in the vector ges.

    df[df$primer %in% ges,]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

df1 day primer replicate count 011311 Arc b1 0 011311 Bdnf b1 0 011311
df1 primer timepoints mean sde Acan 0 1.0000000 0.000000e+00 Acan 20 0.8758265 7.856192e-02 Acan
df primer timepoints mean sde Acan 0 1.000000e+00 0.000000e+00 Acan 20 9.547922e-01 1.729115e-01 Acan
Possible Duplicate: Good Primer for Python Slice Notation reverse a string in Python I've
I am reading Chapter 17 of C Primer Plus, and here is the code
Can somebody point me to a good primer on the above, and what happens
I've started to learn C++ using C++ Primer by Stephen Prate and I'm currently
I am reading the chapter function templates of C++ Primer 3rd edition , and
I'm xuggle primer and I'd like to transcode video to various formats/qualities. As a
Possible Duplicate: Good Primer for Python Slice Notation I've been reading over some sample

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.