Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

new.genpop

genpop constructor


Description

The function new has a method for building genpop objects. See the class description of genpop for more information on this data structure. The functions genpop and as.genpop are aliases for new("genpop", ...).

Usage

## S4 method for signature 'genpop'
initialize(
  .Object,
  tab,
  prevcall = NULL,
  ploidy = 2L,
  type = c("codom", "PA"),
  ...
)

genpop(...)

as.genpop(...)

Arguments

.Object

prototyped object (generated automatically when calling 'new')

tab

A matrix of integers corresponding to the @tab slot of a genpop object, with individuals in rows and alleles in columns, and containing either allele counts

prevcall

an optional call to be stored in the object

ploidy

an integer vector indicating the ploidy of the individual; each individual can have a different value; if only one value is provided, it is recycled to generate a vector of the right length.

type

a character string indicating the type of marker: codominant ("codom") or presence/absence ("PA")

...

further arguments passed to other methods (currently not used)

Details

Most users do not need using the constructor, but merely to convert raw allele data using genind2genpop.

Value

a genpop object

See Also

the description of the genpop class; df2genind and related functions for reading raw allele data


adegenet

Exploratory Analysis of Genetic and Genomic Data

v2.1.3
GPL (>= 2)
Authors
Thibaut Jombart [aut] (<https://orcid.org/0000-0003-2226-8692>), Zhian N. Kamvar [aut, cre] (<https://orcid.org/0000-0003-1458-7108>), Caitlin Collins [ctb], Roman Lustrik [ctb], Marie-Pauline Beugin [ctb], Brian J. Knaus [ctb], Peter Solymos [ctb], Vladimir Mikryukov [ctb], Klaus Schliep [ctb], Tiago Maié [ctb], Libor Morkovsky [ctb], Ismail Ahmed [ctb], Anne Cori [ctb], Federico Calboli [ctb], RJ Ewing [ctb], Frédéric Michaud [ctb], Rebecca DeCamp [ctb], Alexandre Courtiol [ctb] (<https://orcid.org/0000-0003-0637-2959>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.