Subset data frame for specific SNPs only.

subset_snp(df, snp.retain, col.snp = SNPs)

Arguments

df

Data frame containing SNPs.

snp.retain

Character vector. Vector specifying which SNPs to keep. SNPs in snp.retain must match SNPs in col.snp in df.

col.snp

Symbol. Column containing SNPs.

Value

Data frame containing only specified SNPs. If no SNP in snp.retain matches a SNP in col.snp, subset_snp() stops with a warning saying "No SNP in 'snp.retain' matches a SNP in 'col.snp'. Could not filter for SNP.".

Details

Subset data frame for specific SNPs only.

See also