Skip to contents

poppr.all is a wrapper function that will loop through a list of files from the working directory, execute [poppr()], and concatenate the output into one data frame.

Usage

poppr.all(filelist, ...)

Arguments

filelist

a list of files in the current working directory

...

arguments passed on to poppr

Value

see [poppr()]

See also

[poppr()], [getfile()]

Author

Zhian N. Kamvar

Examples

# \dontrun{
# Obtain a list of fstat files from a directory.
x <- getfile(multi=TRUE, pattern="^.+?dat$")

# run the analysis on each file.
poppr.all(file.path(x$path, x$files))
#>  \    
#>   | File: . 
#>  /    
#> 
#>  File format ( / ) not supported.
#> 
#> Supported formats are:
#> GENETIX (.gtx) 
#> FSTAT (.dat) 
#> Genepop (.gen)
#>  
#> STRUCTURE (.str)
#> Error in process_file(dat, missing = missing, cutoff = cutoff, clonecorrect = clonecorrect,     strata = strata, keep = keep, quiet = TRUE): is.genind(input) is not TRUE
# }