genpop {adegenet} | R Documentation |
An object of class genpop
contain alleles counts
for several loci.
It contains several components (see 'slots' section).
Such object is obtained using genind2genpop
which converts
individuals genotypes of known population into a genpop
object.
Note that the function summary
of a genpop
object
returns a list of components.
Note that as in other S4 classes, slots are accessed using @ instead
of $.
tab
:loc.names
:loc.fac
:tab
loc.nall
:all.names
:call
:pop.names
:other
:
Class "gen"
, directly.
Class "popInfo"
, directly.
signature(x = "genpop")
: give the names of the
components of a genpop objectsignature(x = "genpop")
: prints a genpop objectsignature(object = "genpop")
: shows a genpop
object (same as print)signature(object = "genpop")
: summarizes a
genpop object, invisibly returning its contentsignature(object = "genpop")
: returns the number
of loci of the objectThibaut Jombart jombart@biomserv.univ-lyon1.fr
as.genpop
, is.genpop
,code{makefreq}, genind
, import2genind
, read.genetix
, read.genepop
, read.fstat
, na.replace
obj1 <- import2genind(system.file("files/nancycats.gen", package="adegenet")) obj1 obj2 <- genind2genpop(obj1) obj2 if(require(ade4)){ data(microsatt) # use as.genpop to convert convenient count tab to genpop obj3 <- as.genpop(microsatt$tab) obj3 all(obj3@tab==microsatt$tab) all(obj3@pop.names==rownames(microsatt$tab)) # it worked # perform a correspondance analysis obj4 <- genind2genpop(obj1,missing="chi2") ca1 <- dudi.coa(as.data.frame(obj4@tab),scannf=FALSE) s.label(ca1$li,sub="Correspondance Analysis",csub=2) add.scatter.eig(ca1$eig,2,xax=1,yax=2,posi="top") }