Displaying 2 results from an estimated 2 matches for "allp".
Did you mean:
all
2010 Mar 18
2
Pedigree / Identifying Immediate Family of Index Animal
...ne has suggestions there I
would appreciate this as well. Thanks in advance.
Code to calculate generations forward and backward:
#queryIds holds the unique Ids for parents of the index animals
queryIds = unique(c(ped$Sire, ped$Dam));
for(i in 1:gens){
if (length(queryIds) == 0){break};
#allPed is the dataframe with Id,Dam,Sire and Sex for animals in our
colony
newRows <- subset(allPed, Id %in% queryIds);
queryIds = c(newRows$Sire, newRows$Dam);
ped <- unique(rbind(newRows,ped));
}
#build forwards
#when calculating children, queryIds holds the Ids of the previous
gen...
2006 Jul 31
2
Problem with allp ossible combination.
Dear R Users,
Suppose I have a dataset like this:
a b
39700 485.00
39300 485.00
39100 480.00
38800 487.00
38800 492.00
39300 507.00
39500 493.00
39400 494.00
39500 494.00
39100 494.00
39200 490.00
Now I want get a-b for all possible combinations of a and b. Using two 'for'
loop it is easy to calculate. But problem arises when row length of the data
set is