extend(GeneticsPed)
extend()所属R语言包:GeneticsPed
Extend pedigree
扩展系谱
译者:生物统计家园网 机器人LoveR
描述----------Description----------
extend finds ascendants, which do not appear as individuals in pedigree and assigns them as individuals with unknown ascendants in extended pedigree.
extend发现长辈,没有出现个人的血统,并指派他们作为个人与未知的祖先在扩展系谱。
用法----------Usage----------
extend(x, ascendant=NULL, col=NULL, top=TRUE)
参数----------Arguments----------
参数:x
pedigree object
系谱对象
参数:ascendant
character, column names of ascendant(s), see details
性格,方兴未艾的列名(S),查看详细信息
参数:col
character, column name(s) of attribute(s), see details
字符属性,列名(S)(S),查看详细信息
参数:top
logical, add ascendants as individuals on the top or bottom of the pedigree
逻辑,因为个人的顶部或底部的系谱的附加长辈
Details
详情----------Details----------
Argument ascendant can be used to define, which ascendants will be extended. If ascendant=NULL, which is the default, all ascendant columns in the pedigree are used. The same approach is used with other pedigree attributes such as sex, generation, etc. with argument col. Use col=NA, if none of the pedigree attributes should be extended.
参数ascendant可以用来定义,将延长的长辈。如果ascendant=NULL,这是默认的,系谱方兴未艾列。同样的方法用于系谱与其他属性,如性别,代等参数col。使用col=NA,如果系谱属性没有应适当延长。
Sex of “new” individuals is infered from attribute ascendantSex as used in Pedigree function. Generation of “new” individuals is infered as minimal (generationOrder="increasing") or maximal (generationOrder="decreasing") generation value in descendants - 1. See Pedigree on this issue. Family values are extended with means of family.
“新的”个人的性别推测从属性ascendantSexPedigree功能。产生“新的”个人推测为最小(generationOrder="increasing")或最大(generationOrder="decreasing")在子孙一代的价值 - 1。看到Pedigree这个问题。家庭价值观延长手段family。
值----------Value----------
Extended pedigree, where all ascendants also appear as individuals with unknown ascendants and infered other attributes such as sex, generation, etc. if this attributes are in the pedigree.
扩展系谱,所有的长辈也出现未知的长辈和推导的其他属性,如性别,代等个人,如果这个属性是在谱系。
作者(S)----------Author(s)----------
Gregor Gorjanc
参见----------See Also----------
Pedigree, family,
Pedigree,family
举例----------Examples----------
# --- Toy example ---[---玩具的例子---]
ped <- generatePedigree(nId=5, nGeneration=4, nFather=1, nMother=2)
ped <- ped[10:20,]
ped[5, "father"] <- NA # to test robustnes of extend on NA[扩展在NA的耐用性测试]
extend(ped)
extend(ped, top=FALSE)
## Extend only ascendant and their generation[#扩展方兴未艾,他们这一代]
extend(ped, col="generation")
extend(ped, col=c("generation", "sex"))
# --- Bigger example ---[---更大为例---]
ped <- generatePedigree(nId=1000, nGeneration=10, nFather=100,
nMother=500)
nrow(ped)
# Now keep some random individuals[现在保留一些随机的个人]
ped <- ped[unique(sort(round(runif(n=nrow(ped)/2, min=1,
max=nrow(ped))))), ]
nrow(ped)
nrow(extend(ped))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|