subset_genepop_individual: Genepop remove or keep specific sample IDs

View source: R/subset_genepop_individual.R

subset_genepop_individualR Documentation

Genepop remove or keep specific sample IDs

Description

Function for the manipulation of genopop format SNP datasets

Usage

subset_genepop_individual(genepop, indiv = NULL, keep = FALSE, path)

Arguments

genepop

the genepop data to be manipulated. This can be either a file path or a dataframe read in with tab separation, header=FALSE , quote="", and stringsAsFactors=FALSE. This will be the standard genepop format with the first n+1 rows corresponding to the n loci names, or a single comma delimited row of loci names followed by the locus data. Populations are separated by "Pop". Each individual ID is linked to the locus data by " , " (space,space space) and is read in as as a single row (character).

indiv

vector sample IDs of interest. These can be either the order by which they occur or the exact name of the loci indiv <- c("Pop01_01","Pop03_15","Pop16_02") would individuals with these sample names.

keep

logical whether to delete sample IDs specified by indiv (default: TRUE) or delete all other IDs.

path

the filepath and filename of output.


rystanley/genepopedit documentation built on June 27, 2023, 11:33 p.m.