Split a qlist into sublists by attribute

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

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)
#> List of 17
str(slist_2,max.level=1)
#> List of 6 #> $ 2:List of 3 #> $ 3:List of 3 #> $ 4:List of 3 #> $ 5:List of 3 #> $ 6:List of 3 #> $ 7:List of 2