Learn R Programming

adegenet (version 2.0.0)

repool: Pool several genotypes into a single dataset

Description

The function repool allows to merge genotypes from different genind objects into a single 'pool' (i.e. a new genind). The markers have to be the same for all objects to be merged, but there is no constraint on alleles. This function can be useful, for instance, when hybrids are created using hybridize, to merge hybrids with their parent population for further analyses. Note that repool can also reverse the action of seppop.

Usage

repool(...)

Arguments

...
can be i) a list whose components are valid genind objects or, ii) several valid genind objects separated by commas.

Value

  • A genind object.

See Also

seploc, seppop

Examples

Run this code
## use the cattle breeds dataset
data(microbov)
temp <- seppop(microbov)
names(temp)

## hybridize salers and zebu -- nasty cattle
zebler <- hybridize(temp$Salers, temp$Zebu, n=40)
zebler

## now merge zebler with other cattle breeds
nastyCattle <- repool(microbov, zebler)
nastyCattle

Run the code above in your browser using DataLab