[R] Composition like classes & functions

Gregor Gorjanc gregor.gorjanc at bfro.uni-lj.si
Mon Oct 30 09:24:45 CET 2006


Hello!

I am working on "breed composition" of animals in my project. Say I have
an animal 1 with parents 2 (father) and 3 (mother). If father is of
breed A and mother of breed B, then their descendant is of breed AB or
50 % of A and 50 % of B. I would like to have a general way to represent
 this kind of data. I was thinking about list structure i.e.

list(A=0.5, B=0.5)
$A
[1] 0.5

$B
[1] 0.5

Additionally, it should accommodate for more than 2 "classes".

However, I would like to ask if there is anything like this already in R
or contributed packages.

Thanks!

-- 
Lep pozdrav / With regards,
    Gregor Gorjanc
----------------------------------------------------------------------
University of Ljubljana     PhD student
Biotechnical Faculty
Zootechnical Department     URI: http://www.bfro.uni-lj.si/MR/ggorjan
Groblje 3                   mail: gregor.gorjanc <at> bfro.uni-lj.si

SI-1230 Domzale             tel: +386 (0)1 72 17 861
Slovenia, Europe            fax: +386 (0)1 72 17 888

----------------------------------------------------------------------
"One must learn by doing the thing; for though you think you know it,
 you have no certainty until you try." Sophocles ~ 450 B.C.



More information about the R-help mailing list