Description Usage Arguments Value Get matched controls Author(s) See Also Examples
These functions allow to define sets of (eventually matched) control
individuals for one or more given individuals using pedigree data. By
default, controls from the same family than the specified
individual(s) are returned.
They are used e.g. in the genealogicalIndexTest
method.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## S4 method for signature 'data.frame'
getAll(object, id=NULL, ...)
## S4 method for signature 'data.frame'
getExternalMatched(object, id=NULL, match.using, ...)
## S4 method for signature 'data.frame'
getGenerationMatched(object, id=NULL,
include.anc=0, include.off=0, ...)
## S4 method for signature 'data.frame'
getGenerationSexMatched(object, id=NULL,
include.anc=0, include.off=0, ...)
## S4 method for signature 'data.frame'
getSexMatched(object, id=NULL, ...)
|
(in alphabetic order)
id |
A character vector with ids of individuals for whom matched control individuals (from the same family) should be defined. |
include.anc |
For |
include.off |
For |
match.using |
For |
object |
Either a |
... |
Additional arguments; not used at present. |
Refer to the method and function description above for detailed information on the returned result object.
Simply returns the ids of all individuals in the family
(i.e. individuals with the same family id in the pedigree) of the
specified ids in id
.
Returns a list with the ids (of type character
) of the
controls. The names of the list correspond to the family id.
Returns the ids of matched individuals from the same family for
the specified ids in id
.
The match.using
vector is for the matching, i.e. the
function first extracts the values for the individuals in
id
from match.using
and returns the ids of all
individuals whose value in match.using
matches the value of
the individuals specified by id
. Individuals with a missing
value in match.using
are excluded.
Returns a list with the ids (of type character
) of the
controls. The names of the list correspond to the family id.
Returns the ids of individuals matched by the generation of the
individuals in id
. The function returns the ids of all
individuals from the same generation(s) than the individuals in
id
. The arguments include.anc
and include.off
can be used to increase the range of generation from which
individuals are selected.
Returns a list with the ids (of type character
) of the
controls. The names of the list correspond to the family id.
Same as getGenerationMatched
, but matches in addition
individuals by sex (see getSexMatched
).
Returns a list with the ids (of type character
) of the
controls. The names of the list correspond to the family id.
Returns ids of individuals from the same family matching the sex
of the individuals in id
. Individuals with sex being
NA
are excluded. The result is essentially identical to the
getAll
if id
contains ids of male and female
individuals.
Returns a list with the ids (of type character
) of the
controls. The names of the list correspond to the family id.
Johannes Rainer.
pedigree
,
FAData
,
FAProbResults
,
FAKinGroupResults
,
FAKinSumResults
,
FAGenIndexResults
,
genealogicalIndexTest
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ##########################
##
## Defining a small pedigree
##
## load the Minnesota Breast Cancer record and subset to the
## first families.
data(minnbreast)
mbsub <- minnbreast[minnbreast$famid==4 | minnbreast$famid==5, ]
mbped <- mbsub[, c("famid", "id", "fatherid", "motherid", "sex")]
## renaming column names
colnames(mbped) <- c("family", "id", "father", "mother", "sex")
## Get ids of individuals from the same generation than "4"
getGenerationMatched(mbped, id="4")
## Get the ids of gemale individuals from the same generation than
## "4" and "22"
getGenerationSexMatched(mbped, id=c("4", "22"))
## Generate a FAData
fad <- FAData(mbped)
## Plot the pedigree so we can evaluate the results of the function
plotPed(fad, family="4")
## We're using getExternalMatched on the sex of the individuals
## in the pedigree, thus the results are identical to the
## getSexMatched function.
## Extracting the sex using $sex returns a named vector just
## as we need for getExternalMatched.
head(fad$sex)
getExternalMatched(fad, id="4", match.using=fad$sex)
getSexMatched(fad, id="4")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.