Learn R Programming

pophelper (version 1.2.0)

tabulateRunsStructure: Tabulate STRUCTURE runs

Description

Creates a table from STRUCTURE output files with various STRUCTURE parameters.

Usage

tabulateRunsStructure(files = NULL, writetable = FALSE, sorttable = TRUE,
  quiet = FALSE)

Arguments

files

A character or vector of STRUCTURE output files to be tabulated. On windows, use choose.files(multi = TRUE) for interactive selection.

writetable

A logical TRUE or FALSE. Set to FALSE by default. Setting to TRUE writes the output table to the working directory.

sorttable

A logical indicating if the output table needs to be sorted. Default set to TRUE. Sorts table by loci, ind and K.

quiet

A logical TRUE or FALSE. Set to FALSE by default to print number of selected files. If set to TRUE, then number of selected files are not printed.

Value

Returns a dataframe with all runs sorted by loci, ind and K (if sorttable = T). The table has 10 columns namely file name, value of K, number of individuals, number of loci, estimated ln probability of data, mean value of ln likelihood, variance of ln likelihood, mean value of alpha, number of burn-in and number of repeats. Missing values are given NA. The row numbers of the output table denotes the file number selected. This is helpful if a particular file from the table needs to be identified in the selection vector.

See Also

tabulateRunsTess, tabulateRunsMatrix

Examples

Run this code
# NOT RUN {
slist <- list.files(path=system.file("files/structure",package="pophelper"),full.names=TRUE)
tabulateRunsStructure(files=slist)
# }

Run the code above in your browser using DataLab