Description Usage Arguments Details Value Author(s) References See Also Examples
Writes genotype data encoded in an annotated data frame of class
genalex
to a GenAlEx-format text file. Extra data columns are
written immediately to the right of genotype columns. GenAlEx and its
documentation are available at
http://biology-assets.anu.edu.au/GenAlEx.
1 2 | writeGenalex(x, file, quote = FALSE, sep = "\t", eol = "\n", na = "0",
na.character = "", check.annotation = TRUE)
|
x |
Annotated data frame of class |
file |
File name or connection for writing. If given as |
quote |
Logical value ( |
sep |
Column separator for output (defaults to |
eol |
End-of-line character used for output (defaults to |
na |
The string to use when writing missing values in genotype
data. Defaults to |
na.character |
The string to use when writing missing values in
character data. Defaults to |
check.annotation |
If |
This function writes genotypes and associated information within an
annotated data frame of class genalex
to a text file in GenAlEx
format. More information is available in the description for
readGenalex
, and at the GenAlEx website at
http://biology-assets.anu.edu.au/GenAlEx.
Doing writeGenalex(readGenalex("file.txt"), "file-write.txt")
won't
necessarily produce an output file identical to the input file. Three
areas for which this will likely be true are:
Names on columns for alleles other than the first in a locus,
which are ignored by readGenalex
, converted to a simple
concatenation of locus name and allele number in the resulting
class genalex
, and are left out of the output of
writeGenalex
.
Locations of additional data columns beyond the genotype columns,
which readGenalex
should collect wherever there are named
columns to the right of the genotype columns, and which
writeGenalex
will write immediately to the right of the
genotype columns. The same column names are used when writing
as were present when reading.
Missing data will be coded with the values in na
and
na.character
, regardless of the coding used when the data
were read.
No value is returned.
Douglas G. Scofield
Peakall, R. and Smouse P.E. (2012) GenAlEx 6.5: genetic analysis in Excel. Population genetic software for teaching and research-an update. Bioinformatics 28, 2537-2539.
Peakall, R. and Smouse P.E. (2006) GENALEX 6: genetic analysis in Excel. Population genetic software for teaching and research. Molecular Ecology Notes 6, 288-295.
1 2 3 | data(Qagr_adult_genotypes)
# lots of output to terminal
writeGenalex(Qagr_adult_genotypes, file = "")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.