pophelper (version 2.3.0)

summariseQ: Summarise a tabulated dataframe

Description

Creates a summary table from a tabulated dataframe of two or more runs with k, number of runs and individuals.

Usage

summariseQ(data = NULL, writetable = FALSE, exportpath = NULL)

Arguments

data

A dataframe with tabulated runs. An output from tabulateQ(). Must have minimum 2 columns named k and ind.

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, "./dir/anotherdir/". Defaults to NULL which means current working directory.

Value

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.

Details

See the vignette for more details.

See Also

tabulateQ

Examples

Run this code
# NOT RUN {
# STRUCTURE files
sfiles <- list.files(path=system.file("files/structure",package="pophelper"),
full.names=TRUE)
slist <- readQ(sfiles)
tr1 <- tabulateQ(slist)
summariseQ(tr1)

# ADMIXTURE files
afiles <- list.files(path=system.file("files/admixture",package="pophelper"),
full.names=TRUE)
tr1 <- tabulateQ(readQ(afiles))
summariseQ(tr1)

# }

Run the code above in your browser using DataLab