[R] Conditional randomization of groups
yabado
alexhsi1123 at hotmail.com
Thu Aug 6 23:28:45 CEST 2009
Hi
I have a data set which is like this:
Data
ID Type
1 A
2 B
3 A
4 A
5 A
6 B
7 B
8 A
9 B
10 B
As you can see, there are 5 A and 5 B. Now, I want to a randomization of the
data set which will assign 5 ID to a new group called "Set1" and and the
other 5 to "Set2"
The Set1 and Set2 will be either:
Set1 (A A A B B ) and Set2 (A A B B B)
or
Set1(A A B B B) and Set2 (A A A B B).
Each new group need to have at two A and two B, and one more B or A. Except
this condition, everything else (ID, permutation, selection to Set1 and
Set2) need to be random.
Can anyone show me how to do the randomization?
--
View this message in context: http://www.nabble.com/Conditional-randomization-of-groups-tp24854783p24854783.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list