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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:05:04+00:00 2026-06-12T06:05:04+00:00

Lets imagine we have 2 classes (A and B), with 2 samples in each

  • 0

Lets imagine we have 2 classes (A and B), with 2 samples in each class, like so:

A A B B
1 2 3 4

I want to generate all possible unique permutations where the new class groups are mixtures of the old, to calculate new statistics. In this case, we would get:

A A B B
1 3 2 4
1 4 2 3

Any other permutation, when doing a t-test (or ANOVA, etc) between classes A and B will give the same results as the original ordering, and I don’t want it. Is there a simple way to do this using R?

I can imagine generating all permutations of the original index vector, doing splits on the sample class for each permutation, and then checking if that combination of sample classes already exists or not, and if not updating the list of permutations, and going to the next permutation, and so on and so on. I just wanted to check if there was some way to do this using the permute package, or another package function in R.

  • 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-12T06:05:05+00:00Added an answer on June 12, 2026 at 6:05 am

    Found the answer. The partitions package has some great tools for working with these kinds of permutations of sets or partitions

    For the example above, where we have 2 items in two partitions, one would simply do:

    library(partitions)
    listParts(c(2,2))
    

    This returns

    listParts(c(2,2))
    [[1]]
    [1] (1,4)(2,3)
    
    [[2]]
    [1] (1,2)(3,4)
    
    [[3]]
    [1] (1,3)(2,4)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lets imagine that I have videos and each video can have few tags (maximal
Let's imagine I already have a project building .NET 3.5 assembly. Now I want
Imagine a simple case like this: class Book has_many :chapters end Let's say in
Lets imagine I have something resembling the following contrived example ParkingSpace Car ParkingSpaceCar -------------
ok im a newbie on sessions lets imagine that we have a little login
Lets imagine, i have a .dll / Solution in MS Visual Studio 2010 with
Imagine you have an application with several hundreds of classes implementing dozens of high
Lets imagine my situation (it's fake, of course)... I have web-site that have 1000
Lets imagine I've written a custom actions managed class library that I am planning
Lets imagine I have three projects in my solution. The first one is exe

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.