| gl.load | R Documentation |
This is a wrapper for readRDS() The function reads the object from the nominated file, checks if it is a dartR genlight object, converts it if it is not, and returns the gl object. A compliance check can be requested.
Objects of class dartR saved by the legacy dartR package are converted to dartR.base objects without loading the legacy package (which would mask the dartR.base functions), and also when it is not installed. A file-backed (FBM) object saved with saveRDS() instead of gl.save() can only be loaded while its backing file (.bk) exists; otherwise gl.load() stops with an error.
gl.load(file, fbm = FALSE, compliance = FALSE, verbose = NULL)
file |
Name of the file from which to read the saved object [required]. |
fbm |
Whether to convert dartR-gen object to dartR-fbm object [default FALSE]. |
compliance |
Whether to undertake a compliance check [default FALSE]. |
verbose |
Verbosity: 0, silent or fatal errors; 1, begin and end; 2, progress log; 3, progress and results summary; 5, full report [default 2 or as specified using gl.set.verbosity]. |
The loaded object, returned invisibly
Author(s): Arthur Georges. Custodian: Arthur Georges – Post to https://groups.google.com/d/forum/dartr
gl.save
Other io:
gl.read.PLINK(),
gl.read.csv(),
gl.read.dart(),
gl.read.fasta(),
gl.read.silicodart(),
gl.save(),
gl.write.csv(),
utils.read.dart()
f <- file.path(tempdir(), 'testset.rds')
gl.save(testset.gl, f)
gl <- gl.load(f)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.