transform_admix_data {mapmixture} | R Documentation |
Transform Admixture Data
Description
Internal function used to transform admixture data into the correct format for plotting.
Usage
transform_admix_data(data)
Arguments
data |
data.frame or tibble. |
Value
A data.frame or tibble.
Examples
# Admixture Format 1
df_admix <- data.frame(
Site = c("London", "London", "Paris", "Paris", "Berlin", "Berlin",
"Rome", "Rome", "Madrid", "Madrid"),
Ind = c("London1", "London2", "Paris1", "Paris2", "Berlin1", "Berlin2",
"Rome1", "Rome2", "Madrid1", "Madrid2"),
Cluster1 = c(1.0, 0.9, 0.5, 0.5, 0.1, 0.1, 0, 0, 0, 0),
Cluster2 = c(0, 0.10, 0.50, 0.40, 0.50, 0.40, 0.01, 0.01, 0.70, 0.80),
Cluster3 = c(0, 0, 0, 0.10, 0.40, 0.50, 0.99, 0.99, 0.30, 0.20)
)
transform_admix_data(df_admix)
[Package mapmixture version 1.2.0 Index]