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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T20:03:34+00:00 2026-05-29T20:03:34+00:00

I have an ExpressionSet object with 100 samples: > length(sampleNames(eset1)) 100 I also have

  • 0

I have an ExpressionSet object with 100 samples:

> length(sampleNames(eset1))
100

I also have a vector of the names of 75 samples (not the data itself):

> length(vecOf75)
75

How can I subset eset1 (and save it) according to the 75 sample names? That is, I want to disregard those samples in eset1 whose names are not listed in vecOf75. Bear in mind that some of the samples corresponding to the 75 sample names may not be in eset1. Thus,

> length(sampleNames(eset1))

should now give something <75.

  • 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-29T20:03:37+00:00Added an answer on May 29, 2026 at 8:03 pm

    An ExpressionSet can be subset like a matrix, so maybe

    eset2 = eset1[, sampleNames(eset1) %in% vecOf75]
    

    or if all(vecOf75 %in% sampleNames(eset1)) then just

    eset1[, vecOf75]
    

    Not sure what ‘save’ means; either save(eset2, “some_file.rda”) or extracting the components exprs(eset2), pData(eset2) etc., and using write.table and other standard R functions.

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

Sidebar

Related Questions

I am trying to have some sort of Data Object (I'm thinking a dictionary)
I have IQueryable object and I need to take the data inside the IQueryable
Let's say I have a Car object which also has an Engine member, and
I have not written regular expressions before and my knowledge is woefully inadequate. I
I have not used many lambda expressions before and I ran into a case
I have a data.frame in R. It contains a lot of data : gene
I need to suck data from stdin and create a object. The incoming data
We have a project that uses an Interceptor object to tell NHibernate to do
I'm trying to figure out how to have Spring Security return a UserDetails object
I thought this was fixed in 4.0. I have this method public IQueryable<T> All(Expression<Func<T,object>>

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.