Creates a summary table from a tabulated dataframe of two or more runs with k, number of runs and individuals.
summariseQ(data = NULL, writetable = FALSE, exportpath = NULL)
data | A dataframe with tabulated runs. An output from |
---|---|
writetable | A logical indicating if the output table is to be exported as a tab-delimited text file in the working directory. |
exportpath | A path to where content must be exported. For example,
|
Returns a dataframe with all values of K sorted by K. The table has 3 columns namely value of K, number of runs for each K and number of individuals. If the input file is derived from STRUCTURE runs, the table is sorted by loci as well. Other columns include elpdmean, elpdsd, elpdmin and elpdmax.
See the vignette for more details.
# STRUCTURE files sfiles <- list.files(path=system.file("files/structure",package="pophelper"), full.names=TRUE) slist <- readQ(sfiles) tr1 <- tabulateQ(slist) summariseQ(tr1)#> loci ind k runs elpdmean elpdsd elpdmin elpdmax #> 1 25 149 2 3 -7509.367 0.8082904 -7510.175 -7508.558 #> 2 25 149 3 3 -7476.000 0.4358899 -7476.436 -7475.564 #> 3 25 149 4 3 -7650.800 46.1418465 -7696.942 -7604.658 #> 4 25 149 5 3 -7743.567 74.0671542 -7817.634 -7669.500 #> 5 25 149 6 3 -7985.833 32.6353081 -8018.469 -7953.198 #> 6 25 149 7 2 -8614.000 60.5283405 -8674.528 -8553.472# ADMIXTURE files afiles <- list.files(path=system.file("files/admixture",package="pophelper"), full.names=TRUE) tr1 <- tabulateQ(readQ(afiles)) summariseQ(tr1)#> ind k runs #> 1 1592 2 10