View source: R/gl.subsample.loc.r
| gl.subsample.loc | R Documentation |
A function to subsample loci at random in a genlight object with and without replacement.
gl.subsample.loc(x, n, replace = TRUE, error.check = TRUE, verbose = NULL)
x |
Name of the genlight object containing the SNP or presence/absence (SilicoDArT) data [required]. |
n |
Number of loci to include in the subsample [default NULL] |
replace |
If TRUE, sampling is with replacement [default TRUE] |
error.check |
If TRUE, will undertake error checks on input parameters [default TRUE] |
verbose |
Verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log; 3, progress and results summary; 5, full report [default NULL, unless specified using gl.set.verbosity] |
Retain a subset of loci at random, with or without replacement. Parameter n must be less than or equal to nLoc(x).
#' Set error.check = FALSE for speedy execution in simulations
Returns the subsampled genlight object
Custodian: Bernd Gruber (Post to https://groups.google.com/d/forum/dartr)
Other data manipulation:
gl.define.pop(),
gl.drop.ind(),
gl.drop.loc(),
gl.drop.pop(),
gl.edit.recode.pop(),
gl.impute(),
gl.join(),
gl.keep.ind(),
gl.keep.loc(),
gl.keep.pop(),
gl.make.recode.ind(),
gl.merge.pop(),
gl.reassign.pop(),
gl.recode.ind(),
gl.recode.pop(),
gl.rename.pop(),
gl.sample(),
gl.sim.genotypes(),
gl.sort(),
gl.subsample.ind()
gl2 <- gl.subsample.loc(testset.gl, n=50, replace=TRUE, verbose=3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.