write_population: Writes data frame with genotypes and other data to a file

View source: R/write_population.R

write_populationR Documentation

Writes data frame with genotypes and other data to a file

Description

This is a basic output file formatter for saving files necessary for saving output in textual formats.

Usage

write_population(
  df,
  file,
  mode = c("text", "genepop", "structure", "dfdist")[1],
  stratum = NULL,
  ...
)

Arguments

df

The data.frame to be written to the output.

file

The path to the file you want to write to.

mode

Which format to use for writing data to file. At present there are

text

Outputs all data columns with loci treated as colon separated. This is the default.

genepop

Saves genetic data into GENEPOP format. You must specify a stratum.

structure

Saves genetic data into the two-lined per individual STRUCTURE format. You must specify a stratum.

dfdist

Saves genetic data as a FDist, DFDist, DetSel file. You must specify the stratum.

stratum

An optional argument if using genepop or structure formats. By default, the 'text' option writes all data to file.

...

Other options to pass along (e.g., verbose=TRUE)

Value

nothing.

Author(s)

Rodney J. Dyer <rjdyer@vcu.edu>


dyerlab/gstudio documentation built on Feb. 2, 2024, 8:24 p.m.