# NOT RUN {
data(msats.g)
# with defaults (alleles in multiple columns, with ids and stratification)
df <- as.data.frame(msats.g)
str(df)
# one column per locus
onecol.df <- as.data.frame(msats.g, one.col = TRUE)
str(onecol.df)
# just the genotypes
genotypes.df <- as.data.frame(msats.g, one.col = TRUE, ids = FALSE, strata = FALSE)
str(genotypes.df)
# as a matrix instead
genotypes.mat <- as.matrix(msats.g)
str(genotypes.mat)
# }
Run the code above in your browser using DataCamp Workspace