To find p-value of compounds I have next SNPs data.frame structure
> str(SNPs)
'data.frame':   1703 obs. of  4 variables:
 $ group: Factor w/ 2 levels "A","R": 1 1 1 1 1 1 1 1 1 1 ...
 $ rs1  : Factor w/ 3 levels "D/D","I/D","I/I": 1 1 2 3 3 2 1 1 1 1 ...
 $ rs2  : Factor w/ 3 levels "a/a","a/b","b/b": 3 3 2 3 3 2 2 3 3 2 ...
 $ rs3  : Factor w/ 3 levels "G/G","G/T","T/T": 2 1 2 1 1 3 1 1 2 1 ...

> head(SNPs)
  group rs1 rs2 rs3
1     A D/D b/b G/T
2     A D/D b/b G/G
3     A I/D a/b G/T
4     A I/I b/b G/G
5     A I/I b/b G/G
6     A I/D a/b T/T

> tail(SNPs)
     group rs1 rs2 rs3
1698     R I/D b/b G/G
1699     R I/I a/b G/G
1700     R I/D b/b G/T
1701     R I/D b/b G/T
1702     R I/I b/b G/T
1703     R D/D b/b G/T

I try to find compounds of rs and get p-value. Try to compare, for example, rs1+rs2 between two group A and R.
For example, I noticed that rs1 I/I and rs2 b/b in group A very often occur together. So I want to know - is it statistical regularity or not.
How can I compare all posible variants 1+1 of rs1, rs2, rs3 in group A between group R?
For example I have
> tmp <- table(SNPs$rs1_rs2, SNPs$group)    
> tmp

              A R
      D/D b/b 2 1
      I/D a/b 2 0
      I/F b/b 0 3
      I/I a/b 0 1
      I/I b/b 2 1

so i need only combinations in tmp - D/D b/b in group A with D/D b/b in group R, I/D a/b in group A with I/D a/b in group R and etc.
 A: If I understand the question correctly, paste whichever columns you like together, tabulate them, and run pairwise tests, like this:
SNPs$rs1_rs2 <- paste(SNPs$rs1, SNPs$rs2)

tmp <- table(SNPs$rs1_rs2, SNPs$group)

The table will look like:
> tmp

          A R
  D/D b/b 2 1
  I/D a/b 2 0
  I/F b/b 0 3
  I/I a/b 0 1
  I/I b/b 2 1

Then test pairwise:
rcompanion::pairwiseNominalIndependence(as.matrix(tmp), 
    fisher = F, gtest = F, chisq = T, method = "fdr")

You'll get p-values and adjusted p-values (not much info, but I used the data you shared):
          Comparison p.Chisq p.adj.Chisq
1  D/D b/b : I/D a/b   1.000           1
2  D/D b/b : I/F b/b   0.386           1
3  D/D b/b : I/I a/b   1.000           1
4  D/D b/b : I/I b/b   1.000           1
5  I/D a/b : I/F b/b   0.192           1
6  I/D a/b : I/I a/b   0.665           1
7  I/D a/b : I/I b/b   1.000           1
8  I/F b/b : I/I a/b     NaN         NaN
9  I/F b/b : I/I b/b   0.386           1
10 I/I a/b : I/I b/b   1.000           1

