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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:30:13+00:00 2026-05-22T11:30:13+00:00

I’ve got a dataframe like variable k. The column all_possible_names contains more identifiers for

  • 0

I’ve got a dataframe like variable k. The column all_possible_names contains more identifiers for the ILMN code.
Now I want to search in the column all_possible_names for the identifiers available in the dataframe identifier.

z <- matrix(c(0,0,1,1,0,0,1,1,0,0,0,0,1,0,1,1,0,1,1,1,1,0,0,0,"RND1 | AB849382 | uc001aeu.1","WDR | AB361738 | uc001aif.1", "PLAC8 | AB271612 | uc001amd.1","TYBSA | AB859482","GRA | AB758392 | uc001aph.1","TAF | AB142353"), nrow=6,
dimnames=list(c("ILMN_1651838","ILMN_1652371","ILMN_1652464","ILMN_1652952","ILMN_1653026","ILMN_1653103"),c("A","B","C","D","all_possible_names")))
k<-as.data.frame(z)

search<-c("AB361738","RND1", "LIS")
identifier <- as.data.frame(search)

The result must be like this:

    search    Names
1 AB361738    WDR | AB361738 | uc001aif.1
2     RND1    RND1 | AB849382 | uc001aeu.1
3      LIS    NA

After creating this dataframe, the final output can be created. the column names must only contain the naming starting with uc0.

The final result than will be:

    search    Names
1 AB361738    uc001aif.1
2     RND1    uc001aeu.1
3      LIS    NA

Can anyone help me with this?

Many Thanks,
Lisanne

  • 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-22T11:30:14+00:00Added an answer on May 22, 2026 at 11:30 am

    Probably not the best way, but a way:

    firstStep<-lapply(srch, grep, k$all_possible_names, fixed=TRUE, value=TRUE)
    res<-lapply(firstStep, function(subres){
            prts<-unlist(strsplit(subres, " | ", fixed=TRUE))
            prts[which(substr(prts, 1, 3)=="uc0")]
        })
    

    This returns the result as a list, because you may not be sure that there is only one result per search string.

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

Sidebar

Related Questions

I've got a string that has curly quotes in it. I'd like to replace
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want to count how many characters a certain string has in PHP, but
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I would like to count the length of a string with PHP. The string
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported

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.