xadmixture {xadmix} | R Documentation |
Simulated Admixture Data
Description
A dataset containing simulated admixture data of 600 observations.
Usage
xadmixture
Format
A data frame with 600 rows and 8 variables:
acc
Accession identifier
country
Country where plant material was collected
species
Name of species
K1
,K2
,K3
,K4
,K5
Admixture coefficients; expresses the proportions of the respective ancestries. Sum up to 1.
Source
Data simulated for this package; for code see: https://github.com/SpaceCowboy-71/xadmix/blob/main/data-raw/xadmixture.R
Examples
# load simulated admixture data
data("xadmixture")
# create a subset of the data
xadmixture_sub <- admix_subset(xadmixture,
country = c("GBR", "FRA"),
anc = c("K1", "K2"),
pct = c(0.02, 0.2))
# generate a grouped & sorted stacked barplot
admix_barplot(xadmixture_sub,
K = 4:ncol(xadmixture),
sortkey = "K1",
grouping = "country",
palette = "turbo")
[Package xadmix version 1.0.0 Index]