summariseQ: Summarise a tabulated dataframe

Description Usage Arguments Details Value See Also Examples

Description

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

Usage

1
summariseQ(data = NULL, writetable = FALSE)

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.

Details

See the vignette for more details.

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.

See Also

tabulateQ

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# 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)

royfrancis/pophelper documentation built on Aug. 21, 2018, 4:48 a.m.