Write a strataG object from a tidy data frame. Used internally in radiator and might be of interest for users.

write_gtypes(data, write = FALSE, filename = NULL)

Arguments

data

(4 options) A file or object generated by radiator:

  • tidy data

  • Genomic Data Structure (GDS)

How to get GDS and tidy data ? Look into tidy_genomic_data, read_vcf or tidy_vcf.

write

(logical, optional) To write in the working directory the gtypes object. The file is written with radiator_gtypes_DATE@TIME.RData if no filename is provided and can be open with load or readRDS. Default: write = FALSE.

filename

(character, optional) Filename prefix. Default: filename = NULL.

Value

An object of the class strataG is returned.

References

Archer FI, Adams PE, Schneiders BB. strataG: An r package for manipulating, summarizing and analysing population genetic data. Molecular Ecology Resources. 2017; 17: 5-11. doi:10.1111/1755-0998.12559

See also

Author

Thierry Gosselin thierrygosselin@icloud.com

Examples

if (FALSE) {
# require(strataG)
# with radiator GDS
turtle <- radiator::write_gtypes(data = "my.radiator.gds.rad")

# with tidy data
turtle <- radiator::write_gtypes(data = "my.radiator.rad")
}