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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:47:24+00:00 2026-06-12T10:47:24+00:00

Possible Duplicate: Random sampling a list of genes I would like to create 1000

  • 0

Possible Duplicate:
Random sampling a list of genes

I would like to create 1000 random lists of 1652 genes from a universe of 19.000 genes. I decided to replace since the universe is not so big. The only condition is that lists can contain similar genes between them (due to replacement) but each list can not contain a gene more than one time. So it will be unique in the single list. Any suggestion about this?

Ex: Universe = letters[1:26]

Desired output:

 [[1]]  [[2]]   [[3]]   [[...]]
   a      b       f
   b      c       a
   c      d       b
   f      z       j
   h      j       o

I would like avoid a situation like:

 [[1]]  [[...]]
  a   
  a   
  b   
  c
  c

Since the universe is not so big I cannot set REPLACE = F. If I set REPLACE = T, replicated elements occur in the list…this is what I’m trying to avoid for my analysis.

Thanks in advance

E.

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

    This code draws 5 samples of 10 from the Universe, without replacement. I think this is what you want:

    Universe = letters[1:26]
    replicate(5, sample(Universe, 10, replace = FALSE))
    
         [,1] [,2] [,3] [,4] [,5]
     [1,] "j"  "l"  "k"  "c"  "j" 
     [2,] "g"  "i"  "c"  "t"  "g" 
     [3,] "z"  "u"  "m"  "u"  "e" 
     [4,] "a"  "b"  "t"  "e"  "q" 
     [5,] "q"  "d"  "j"  "k"  "m" 
     [6,] "r"  "a"  "l"  "l"  "x" 
     [7,] "e"  "g"  "r"  "i"  "f" 
     [8,] "l"  "w"  "o"  "g"  "u" 
     [9,] "b"  "y"  "b"  "x"  "c" 
    [10,] "u"  "j"  "x"  "a"  "b" 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: How Random is System.Guid.NewGuid()? Based on this question I would like to
Possible Duplicate: generating random numbers from skewed normal distribution i expect a long array
Possible Duplicate: Pick random property from a Javascript object suppose I have a javascript
Possible Duplicate: How to get random record from MS Access database In my project
Possible Duplicate: How do I create a random alpha-numeric string in C++? I need
Possible Duplicate: How to generate a random number from within a range - C
Possible Duplicate: Incorporating license key approach for a WinForms app I would like to
Possible Duplicate: Get random item from array I need a code to set a
Possible Duplicate: class System.Random .. why not static? Following on from Generated random numbers
Possible Duplicate: Random Color generator in Javascript I have some data I'd like to

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.