Learn R Programming

pophelper (version 1.2.0)

tabulateRunsMatrix: Tabulate Matrix runs

Description

Imports tabular data (Admixture, fastStructure etc) and creates a table with filenames, K and number of individuals.

Usage

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

Arguments

files

A character vector of MATRIX cluster files to be tabulated. See details. On windows, use choose.files(multi = TRUE) for interactive selection.

writetable

A logical indicating if output table must be exported as a tab-delimited text file in the working directory.

sorttable

A logical indicating if output table is to be sorted. Sorts table by ind and K.

quiet

A logical indicating if a message showing the number of selected files is displayed. The message is supressed if set to T.

Value

Returns a dataframe with filenames, K and number of individuals of all runs sorted by ind and K (if sorttable = T). 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.

Details

Expected input files are Admixture run files or fastStructure meanQ files. Input files can be any tab-delimited, space-delimited or comma-delimited tabular data without headers.

See Also

tabulateRunsStructure, tabulateRunsTess alist <- list.files(path=system.file("files/admixture",package="pophelper"),full.names=TRUE) tabulateRunsMatrix(files=alist)