This function converts a `genlight` object into a `dartR` object by
changing its class attribute.
It is used to convert legacy data sets to the new dartR format.
gl2dartR(x, filename = NULL, file.path = tempdir())
Arguments
- x
An object of class `genlight` to be converted.
- filename
A character string specifying the name of the file to save
the converted object. [default is gl.rds]
- file.path
A character string specifying the path to save the file.
Value
The input object with class changed to `"dartR"` and its package attribute set to `"dartR.base"`.
Examples
simgl <- glSim(10, 100, ploidy = 2, indnames=1:10, locnames=1:100) # Simulating a genlight object
simgl <- gl2dartR(simgl)
pop(simgl)<- rep("A",10)
indNames(simgl) <- paste0("ind",1:10)
gl.smearplot(simgl, verbose=0)