Learn R Programming

pophelper (version 1.2.0)

runsToDfMatrix: Convert MATRIX cluster files to R dataframe.

Description

Takes one or more MATRIX cluster run files (tabular files, Admixture, fastStructure etc) and converts each of them to separate dataframes.

Usage

runsToDfMatrix(files = NULL)

Arguments

files

A character or character vector of one or more ADMIXTURE cluster run files. Use choose.files(multi = TRUE) to select interactively.

Value

If a single file is selected, a single dataframe is returned. If multiple files are selected, a list with multiple dataframes is returned.

Details

Input files are expected to be Admixture run files or fastStructure meanQ files. Input files can also be any tab-delimited, space-delimited or comma-delimited tabular data without header.

See Also

runsToDfStructure, runsToDfTess

Examples

Run this code
# NOT RUN {
alist <- list.files(path=system.file("files/admixture",package="pophelper"),full.names=TRUE)
#create a dataframe
runsToDfMatrix(alist[1])

#create a list of dataframes
runsToDfMatrix(alist)
# }

Run the code above in your browser using DataLab