Dear R community,

I am trying to create a matrix of permutations of a vector:
bands <- c("AL", "B", "DB", "DG", "G", "K", "LB", "LG", "MG", "O", "P",
"PI", "PK", "PU", "R", "V", "W", "Y")

Each permutation must be 4 characters long. permutations() from the gtools
package does this easy enough:
possible.combos <- permutations(18, 4, bands)

However, ³AL² must be one of the elements in each permutation.
Any ideas?

Thanks in advance,
Ray 


        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to