family(GeneticsPed)
family()所属R语言包:GeneticsPed
Find families (lines) in the pedigree
在家庭谱系(系)
译者:生物统计家园网 机器人LoveR
描述----------Description----------
family classifies individuals in the pedigree to distinct families or lines. Two individuals are members of one family if they have at least one common ascendant. family<- provides mean to properly add family information into the pedigree.
family个人在不同的家庭或线谱系分类。这两个人是一个家庭的成员,如果他们至少有一个共同的方兴未艾。 family<-提供的意思是正确添加到血统的家庭信息。
用法----------Usage----------
family(x)
family(x, col=NULL) <- value
参数----------Arguments----------
参数:x
pedigree object
系谱对象
参数:col
character, column name in x for family
字符,x列名家庭
参数:value
family values for individuals in the pedigree
在系谱个人的家庭价值观
Details
详情----------Details----------
col provides a mean to name or possibly also rename family column with user specified value, say "familia" in Spanish. When col=NULL, which is default, "family" is used.
col提供了一个命名或与用户指定的值也可能命名家庭列说,“福美来”在西班牙语。当col=NULL,这是默认情况下,“家庭”的使用。
值----------Value----------
A vector of family values (integers)
一个家庭价值观的向量(整数)
作者(S)----------Author(s)----------
Gregor Gorjanc
参见----------See Also----------
Pedigree
Pedigree
举例----------Examples----------
## Two families examples[#二家庭的例子]
ped <- data.frame( id=c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11),
father=c(0, 0, 0, 0, 0, 0, 5, 1, 3, 8, 7),
mother=c(0, 0, 0, 0, 0, 0, 6, 2, 4, 9, 10),
generation=c(1, 1, 1, 1, 1, 1, 2, 2, 2, 3, 4))
ped <- Pedigree(ped, unknown=0, generation="generation")
family(ped)
## After break we get two families[#分手后,我们得到两个家庭]
ped1 <- removeIndividual(ped, individual=11)
family(ped1)
## Subsetting can also be used[#也可以用子集]
family(ped[1:10,])
family(ped[7:10,])
## Pedigree need not be sorted in advance[#谱系需要不事先排序]
ped2 <- ped[sample(1:10), ]
family(ped2)
## Assign family values to pedigree[#将家庭价值观系谱]
family(ped) <- family(ped)
ped
family(ped, col="familia") <- family(ped)
ped
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|