summary.loci {pegas}R Documentation

Print and Summaries of Loci Objects

Description

These functions print and summarize table of alleles and loci (objects of class "loci").

Usage

## S3 method for class 'loci':
print(x, details = FALSE, ...)
## S3 method for class 'loci':
summary(object, ...)
## S3 method for class 'summary.loci':
print(x, ...)
## S3 method for class 'loci':
x[i, j, drop = TRUE]
## S3 method for class 'summary.loci':
plot(x, loci, what = "both", layout = 1, col = c("blue", "red"), ...)

Arguments

x, object an object of class "loci" or "summary.loci".
details a logical value: if TRUE the data are printed as a data frame; the default is FALSE.
i, j indices of the rows and/or columns to select or to drop. They may be numeric, logical, or character (in the same way than for standard R objects).
drop a logical specifying whether to returned an object of the smallest dimension possible, i.e., may return a vector or a factor if drop = TRUE.
loci the loci (genes) to be plotted. By default, all loci are plotted.
what the frequencies to be plotted. Three choices are possible: "alleles", "genotypes", and "both" (the default), or any unambiguous abbreviations.
layout the number of graphs to be plotted simultaneously.
col the colours used for the barplots.
... further arguments to be passed to or from other methods.

Details

Genotypes not observed in the data frame are not counted.

When using the [ method, if only one column is extracted or if the returned data frame has no `loci' column, then the class "loci" is dropped.

An object of class "loci" can be edited in the R data editor with, e.g., fix(x) or x <- edit(x).

Value

summary.loci returns a list with the genes as names and each element made a list with two vectors "genotype" and "allele" with the frequencies (numbers) of genotypes and alleles, respectively. The names of these two vectors are the observed genotypes and alleles.
print and plot methods return NULL.

Author(s)

Emmanuel Paradis

See Also

read.loci, getAlleles, edit.loci

Examples

require(adegenet)
data(nancycats)
x <- as.loci(nancycats)
s <- summary(x)
plot(s, layout=20, las=2)
layout(1)

[Package pegas version 0.3 Index]