N.Hubner at ncmls.ru.nl
2014-Mar-14 09:08 UTC
[R] combinatorics for minimal set of samples
Dear all, This is something for the combinatorics freaks amongst you (which I am certainly not :-). I do the following problem to solve and was wondering if this can be easily done using R: I have a set of, let's say, 10 variables: n(varibale) = 10 e.g. var <- c(a,b,c,d,e,f,g,h,i,j) per experiment, I want to pick 4 variables e.g. exp1 <- c(a,b,c,d), exp2 <- c(e,f,g,h), ... each variable should be present in 4 different experiments each varibale may co-occur in max. 2 experiments with another variable Questions: 1) What is the number of minimal experiments that all of the above prerequisites are met? 2) Report a list of the combinations It would be great to have a script that is flexible for all prerequisites. Thanks a lot already in advance! Nina The Radboud University Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. [[alternative HTML version deleted]]
Perhaps this blog post will be of use:
http://www.r-bloggers.com/generating-balanced-incomplete-block-designs-bibd/
HTH,
-- David
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of N.Hubner at ncmls.ru.nl
Sent: Friday, March 14, 2014 4:08 AM
To: r-help at r-project.org
Subject: [R] combinatorics for minimal set of samples
Dear all,
This is something for the combinatorics freaks amongst you (which I am certainly
not :-).
I do the following problem to solve and was wondering if this can be easily done
using R:
I have a set of, let's say, 10 variables: n(varibale) = 10
e.g. var <- c(a,b,c,d,e,f,g,h,i,j)
per experiment, I want to pick 4 variables
e.g. exp1 <- c(a,b,c,d), exp2 <- c(e,f,g,h), ...
each variable should be present in 4 different experiments
each varibale may co-occur in max. 2 experiments with another variable
Questions:
1) What is the number of minimal experiments that all of the above prerequisites
are met?
2) Report a list of the combinations
It would be great to have a script that is flexible for all prerequisites.
Thanks a lot already in advance!
Nina
The Radboud University Medical Centre is listed in the Commercial Register of
the Chamber of Commerce under file number 41055629.
[[alternative HTML version deleted]]
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
This e-mail and any materials attached hereto, including, without limitation,
all content hereof and thereof (collectively, "XR Content") are
confidential and proprietary to XR Trading, LLC ("XR") and/or its
affiliates, and are protected by intellectual property laws. Without the prior
written consent of XR, the XR Content may not (i) be disclosed to any third
party or (ii) be reproduced or otherwise used by anyone other than current
employees of XR or its affiliates, on behalf of XR or its affiliates.
THE XR CONTENT IS PROVIDED AS IS, WITHOUT REPRESENTATIONS OR WARRANTIES OF ANY
KIND. TO THE MAXIMUM EXTENT PERMISSIBLE UNDER APPLICABLE LAW, XR HEREBY
DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS AND IMPLIED, RELATING TO THE XR
CONTENT, AND NEITHER XR NOR ANY OF ITS AFFILIATES SHALL IN ANY EVENT BE LIABLE
FOR ANY DAMAGES OF ANY NATURE WHATSOEVER, INCLUDING, BUT NOT LIMITED TO, DIRECT,
INDIRECT, CONSEQUENTIAL, SPECIAL AND PUNITIVE DAMAGES, LOSS OF PROFITS AND
TRADING LOSSES, RESULTING FROM ANY PERSON'S USE OR RELIANCE UPON, OR
INABILITY TO USE, ANY XR CONTENT, EVEN IF XR IS ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES OR IF SUCH DAMAGES WERE FORESEEABLE.