This is a rather specialized issue... you probably should be cc'ing the package 
maintainer as added here.

I have never used this package.. but perhaps the fact that 701 is female yet 
listed as a father of 801 and 802 could be causing problems. (If so, this may 
raise issues of family structure flexibility, though it could be appropriate 
for genetics studies.)

On August 8, 2019 7:11:50 AM PDT, Thomas Bolger <tom.bol...@ucd.ie> wrote:
>Hi
>
>I have just started to do some analysis of genealogies and seem to be
>doing
>something wrong when using gen.genealogy. The following is the script
>and
>output that I used. Any help greatfully apprciated
>
>library(GENLIB)
>> library(ggenealogy)
>> library(igraph)
>> #
>> #
>> ###Data input as data frame
>>
>ind<-c(501,502,601,603,605,608,701,702,703,704,705,706,707,708,709,710,801,802)
>>
>father<-c(401,411,501,501,501,501,601,601,601,603,603,603,605,605,608,608,701,701)
>>
>mother<-c(402,412,502,502,502,502,602,602,602,604,604,604,606,607,609,609,711,711)
>> sex<-c(1,2,1,1,1,1,2,2,1,2,1,2,1,1,1,1,1,2)
>> gen.df<-data.frame(ind, father, mother, sex)
>> #print data to check
>> print (gen.df)
>   ind father mother sex
>1  501    401    402   1
>2  502    411    412   2
>3  601    501    502   1
>4  603    501    502   1
>5  605    501    502   1
>6  608    501    502   1
>7  701    601    602   2
>8  702    601    602   2
>9  703    601    602   1
>10 704    603    604   2
>11 705    603    604   1
>12 706    603    604   2
>13 707    605    606   1
>14 708    605    607   1
>15 709    608    609   1
>16 710    608    609   1
>17 801    701    711   1
>18 802    701    711   2
>> #
>> #
>> genex<-gen.genealogy(gen.df)
>Error in gen.genealogy(gen.df) :
> Invalid 'gen' parameter: identical individual number for both 'father'
>and 'mother'
>> #
>>

-- 
Sent from my phone. Please excuse my brevity.

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to