pophelper (version 2.3.0)

splitQ: Split a qlist into sublists by attribute

Description

Split a qlist into sublists by attribute

Usage

splitQ(qlist, by = "k")

Arguments

qlist

A qlist object

by

A valid attribute name. Generally k or ind. Structure runs can take loci, burin, reps etc. Any attribute name returned by sapply(qlist,attributes) should work. Defaults to 'k'.

Value

Returns a list of qlist objects

Examples

Run this code
# NOT RUN {
sfiles <- list.files(path=system.file("files/structure",package="pophelper"), full.names=TRUE)
slist <- readQ(sfiles)
slist_2 <- splitQ(slist)
str(slist,max.level=0)
str(slist_2,max.level=1)

# }

Run the code above in your browser using DataCamp Workspace