Displaying 1 result from an estimated 1 matches for "combab".
Did you mean:
combat
2006 Jul 13
1
looping using combinatorics
...1,2,3,4,5,6,7,8,9,10,11,12)
a <- matrix(a1,2,3,byrow=T)
a
b1 <- c(13,14,15,16,17,18,19,20,21,22,23,24)
b <- matrix(b1,2,3,byrow=T)
b
c1 <- c(25,26,27,28,29,30,31,32,33,34,35,36)
c <- matrix(b1,2,3,byrow=T)
c
# example: combine the first two vectors "a" and "b"
combab <- rbind(a,b)
# the a,b combined data from the algorithm later below should look like
# something like the following:
combab
# use the combinatorics "combn" function found in the "combinat" package
on CRAN
m <- combn(3,2) # three choose two combinations
m
# the first...