gen.occ: Ancestor occurences

Description Usage Arguments Value See Also Examples

Description

Returns the number of times that the specified ancestors are present in the genalogies of the specified probands.

Usage

1
gen.occ( gen, pro = "0", ancestors = "0", typeOcc = "IND", ...)

Arguments

gen

An object of class GLgen obtained with gen.genealogy, gen.lineages or gen.branching. Required.

pro

Vector of proband id numbers to be included. Default is 0, which will select all individuals without children.

ancestors

Vector of ancestors id numbers to be included. Default is 0, which will select all individuals without parents.

typeOcc

If typeOcc="IND" (default), the number of occurences for each proband will be returned. If typeOcc="TOTAL", the sum of all occurences over all probands will be returned.

...

Option to pass additionnal arguments automaticaly between methods. Internal use only.

Value

A matrix with number of lines equal to the number of ancestors included and the number of columns equal to the number of probands included if typeOcc="BRUT" or only one column if typeOcc="TOTAL"

See Also

gen.genealogy gen.rec gen.implex gen.meangendepth gen.gc

Examples

1
2
3
4
5
6
7
8
9
data(geneaJi) 
genJi<-gen.genealogy(geneaJi) 
## Not run: Number of occurences of ancestors in the specified proband's genealogy
gen.occ(genJi, pro=c(1,29), ancestors=c(3,6,10,12,14,16,18,20,26,28))

data(genea140) 
gen140<-gen.genealogy(genea140) 
gen.occ(gen140, pro=c(454422,676521,677273,717537,717634,717709,868572), 
        ancestors=c(18305,18528,31114,18325))


Search within the GENLIB package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.