Split a qlist into sublists by attribute
splitQ(qlist, by = "k")
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 |
Returns a list of qlist objects
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#> 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