tabulateQ: Tabulate runs from a qlist

Description Usage Arguments Details Value See Also Examples

View source: R/pophelper.R

Description

Takes a qlist of one of more numeric dataframes and creates a table with filenames, K and number of individuals.

Usage

1
tabulateQ(qlist = NULL, writetable = FALSE, sorttable = TRUE)

Arguments

qlist

A qlist (list of dataframes). An output from readQ.

writetable

A logical indicating if the 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.

Details

The input must be a list of dataframes. If one dataframe is used, then it must be inside a list. If the list items are named, then the item name is used as filename, else sample1, sample2 etc. is used.

See the vignette for more details.

Value

Returns a dataframe with filenames (if list is not named, then sample1, sample2 etc. is used), 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. If input files come from STRUCTURE runs, columns loci, burnin, reps, elpd, mvll and vll are also returned. In input files come from TESS3, columns loci, gif, rmse, crossentropy and ploidy are included as well.

See Also

summariseQ

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# STRUCTURE files
sfiles <- list.files(path=system.file("files/structure",package="pophelper"),full.names=TRUE)
slist <- readQ(sfiles)
tabulateQ(qlist=slist)

# TESS files
tfiles <- list.files(path=system.file("files/tess",package="pophelper"),full.names=TRUE)
tlist <- readQ(tfiles)
tabulateQ(qlist=tlist)

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

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