'genalex'
. The "genetic.data.format"
attribute present in earlier versions of this package is removed.'genalex'
'genalex'
: printGenalexGenotype
is replaced by printGenotype
, computeGenalexColumns
is replaced by getLocusColumns
, reorderGenalexLoci
is replaced by reorderLoci
, getGenalexLocus
is replaced by getLocus
, putGenalexLocus
is replaced by replaceLocus
, dropGenalexLoci
is replaced by dropLocus
, and reduceGenalexPloidy
is replaced by reducePloidy
getPopulation
to return genotypes for specific populations in a class 'genalex'
objectis.genalex
to have shallow (default) or deep (force = TRUE
) checking of class 'genalex'
consistency. With deep checking, attributes are inferred from the structure of the data frame and compared to the actual attributes. Checking of string attributes (dataset.title
, data.file.name
) and extra data columns may skipped with options.as.genalex
generic with as.genalex.genalex
and as.genalex.data.frame
. The latter will convert a pre-class 'genalex'
data frame to class 'genalex'
, and is used wherever a data frame is returned so conversion from old to new format happens automatically. It will also convert a suitably-formatted data frame to class 'genalex'
after determining suitable attributessummary
method for class 'genalex'
which prints a few lines describing the data set, followed by a summary of the data frame contents and a summary of the extra columns, if presentas.data.frame
method to convert class 'genalex'
to class 'data.frame'
, optionally clearing all class 'genalex'
-specific attributesas.genetics
method to convert class 'genalex'
to a data frame with genotypes for each locus encoded using class 'genotype'
or class 'haplotype'
from package genetics
splitGenotypes
function to split genotype
-encoded genotypes into separate columns of a data framejoinGenotypes
function to join class 'genalex'
-style allele columns into a single column per locusas.loci.genalex
method for the as.loci
generic from package pegas
to convert a class 'genalex'
object to class 'loci'
, and as.genalex.loci
for the reverse conversiongenalex
function to create a class 'genalex'
object from constituent datarbind
method to combine samples from multiple class 'genalex'
objectscbind
method to combine loci and extra data columns from multiple class 'genalex'
objectsaddLocus
method to directly add genotype data to the right side of an existing class 'genalex'
objectextra
and extra<-
methods to get and set the extra columns of a class 'genalex'
object. The latter coerces its value
object to a data frame, if it is not already, does a bit of error checking, and sets the row names to be the sample names of the object.ploidy
method to get the ploidy of an object of class 'genalex'
readGenalex
now has ...
in its argument list, for additional arguments to be passed to scan()
while reading datana.strings
argument to readGenalex
, with defaults that reflect GenAlEx's own expectations for missing datana
and na.character
arguments to writeGenalex
, with values to use for NA in genotype/numeric/logical columns and character columns, respectivelyreadGenalexExcel
and writeGenalexExcel
which use the XLConnect
package to read and write to Excel files of both .xls
and .xlsx
formats. These functions verify the consistency of their annotations and data prior to writing; this check can be removed on option.writeGenepop
to write data in a class 'genalex'
object to a Genepop-format text filetype.convert(..., as.is=TRUE)
, so that character columns are not converted to factors.writeGenalex(..., quote=TRUE)
will only quote names in the GenAlEx header, in the first two columns, and in any character-valued extra columnslocus.columns
attribute now has names which match the corresponding locicheckNullAlleles
from my popgen repository into this packagecheckNullAlleles
to return a matrix of potential null alleles, with a couple of indexing modesquiet=
option to checkNullAlleles
, and pass through some arguments to printGenotype
when quiet=FALSE
Qagr_adult_genotypes
and Qagr_pericarp_genotypes
data sets and modified examples to use them, and removed the example_genotypes
data setinst/extdata
to hold data in non-R formats (simple tables), which of course includes GenAlEx-format datawriteGenalex
, to write a data.frame created by this package to a GenAlEx-compatible text file, and documented differences between output of writeGenalex
and input to readGenalex
is.genalex
when genetic.data.format
attribute doesn't existreorderGenalexLoci
devtools
-installable github repository (so development releases are always available via devtools::install_packages("douglasgscofield/readGenalex")
)readGenalex-internal.R
example_genotypes
toy dataset. After loading the package with library(readGenalex)
do data(example_genotypes)
to load example_genotypes
into your envirnment. The same dataset is also available here in text form as data/example_genotypes.txt
..Rbuildignore
extra.columns
attributegetGenalexLocus()
when given a pop=
argumentprintGenalexGenotype()
to print sample name and population name using as.character()
since population names are stored as factorsdata.column.names
attribute, which duplicated the values in names
reduceGenalexPloidy()
. Currently only handles 2n to 1n, and selects only the first allele of each locus.extra.columns
attribute.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.