so, I have this vector c("T", "A", "C", "G") for genomic data. I want to generate all possible combinations of size 3, with repeats such as:
T T T
T T A
T T C
T T G
T A T
..
that would give me 4^3=64 combinations. Combinations of size 4 would give 4^4, and for size 5 should give 4^5=1024 rows.
I searched through SOF, and think expand.grid() would do that, but I couldn't find out how to use it to get the desired output. Any idea?