Hi,
You can use the select method to extract particular columns and rows. According to your dataset, you can use the below-given code.
> df
  IND snp1 snp2 snp3 snp4 snp5
1   1  A/G  T/T  T/C  G/C  G/G
2   2  A/A  C/C  G/G  G/G  A/A
3   3  T/T  G/G  C/C  C/C  T/T
> select(df, snp1,snp3,snp4)[1,1:3]
  snp1 snp3 snp4
1  A/G  T/C  G/C
I hope this will give you the approach.