% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/constructors.R
\docType{methods}
\name{initialize,genpop-method}
\alias{initialize,genpop-method}
\alias{initialize,genpop-methods}
\alias{genpop}
\alias{as.genpop}
\title{genpop constructor}
\usage{
\S4method{initialize}{genpop}(.Object, tab, prevcall = NULL, ploidy = 2L,
  type = c("codom", "PA"), ...)

genpop(...)

as.genpop(...)
}
\arguments{
\item{.Object}{prototyped object (generated automatically when calling 'new')}

\item{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}

\item{prevcall}{an optional call to be stored in the object}

\item{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.}

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

\item{...}{further arguments passed to other methods (currently not used)}
}
\value{
a \linkS4class{genpop} object
}
\description{
The function \code{new} has a method for building \linkS4class{genpop} objects.
See the class description of \linkS4class{genpop} for more information on this data structure.
The functions \code{genpop} and \code{as.genpop} are aliases for \code{new("genpop", ...)}.
}
\details{
Most users do not need using the constructor, but merely to convert raw allele data using \code{\link{genind2genpop}}.
}
\seealso{
the description of the \linkS4class{genpop} class; \code{\link{df2genind}} and related functions for reading raw allele data
}
