Load delimited data
Value
List structured for run_mcmc(); see load_long_form_data().
Details
Load data.frame with a sample_id column and the remaining
columns are loci. Each cell contains a separator delimited string
representing the observed alleles at that locus for that sample.
Returned data contains vectors sample_ids and loci that are ordered
as the results will be ordered from running the MCMC algorithm.
Examples
df <- data.frame(
sample_id = c("S1", "S2", "S3"),
L1 = c("A;B", "A", "B"),
L2 = c("A", "A;C", "C")
)
dat <- load_delimited_data(df, sep = ";")
dat$sample_ids
#> [1] "S1" "S2" "S3"
dat$data[["L2"]]
#> NULL