View source: R/utils.dartR.class.def.r
| rbind.dartR | R Documentation |
Combines the individuals of two or more dartR objects that hold the same loci. Loci are matched by name, so the objects may list them in different orders; the result follows the locus order of the first object.
Metadata are carried over: locus metrics come from the first object;
individual metrics are stacked (a column missing from an object is filled
with NA), and so are coordinates in latlon when every object has
them; the locus-metric flags are reset to FALSE, because metrics such as
call rate and allele frequencies no longer describe the combined set of
individuals (use gl.recalc.metrics to recompute them); the call is
added to the history of the first object.
The function stops when the objects hold different loci, code the alleles
of a locus differently (loc.all), or mix SNP (ploidy 2) and
SilicoDArT (ploidy 1) data. To combine a list of objects, use
do.call(rbind, list_of_objects).
## S3 method for class 'dartR'
rbind(..., backingfile = NULL, code = NULL, chunk = 2048L, quiet = TRUE)
... |
dartR objects to combine [required] |
backingfile |
File stem for the backing file of the resulting FBM, or NULL for a temporary file in getOption("FBM.dir") [default NULL] |
code |
code mapping to use for the resulting FBM=CODE_012; if NULL, inherits from the first FBM input |
chunk |
number of columns to process in a block when copying from FBMs |
quiet |
suppress warnings. default: TRUE |
A dartR object
t1 <- platypus.gl
t2 <- rbind(t1[1:5,],t1[6:10,])
# a list of objects
t3 <- do.call(rbind, list(t1[1:5,], t1[6:10,], t1[11:15,]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.