reset: Reset modifications to an EIGENSTRAT object

Description Usage Arguments Value Examples

View source: R/eigenstrat.R

Description

Set 'exclude' and 'group' modifications of snp and ind files, effectively resetting the dataset into its original state.

Usage

1

Arguments

data

EIGENSTRAT data object.

Value

EIGENSTRAT data S3 object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: # download an example genomic data set and prepare it for analysis
snps <- eigenstrat(download_data(dirname = tempdir()))

# group individual samples into larger populations, creating a new
# EIGENSTRAT R object
new_snps <- relabel(
    snps,
    European = c("French", "Sardinian"),
    African = c("Dinka", "Yoruba", "Mbuti", "Khomani_San"),
    Archaic = c("Vindija", "Altai", "Denisova")
)

# remove the population grouping in the previous step - this
# results in the same EIGENSTRAT object tht we started with
original_snps <- reset(new_snps)

## End(Not run)

admixr documentation built on July 8, 2020, 6:19 p.m.