David L Carlson
dcarlson at tamu.edu
Thu Jan 21 15:39:14 CET 2016
Assuming Michael is correct, you can use setdiff():
> current <- sample.int(4500, 4495) # All but 5 numbers used
> setdiff(1:4500, current) # Find which numbers are left
 905 1252 2508 3192 4484
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77840-4352
From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Michael Dewey
Sent: Thursday, January 21, 2016 7:34 AM
To: maryam firoozi; r-help at r-project.org
Subject: Re: [R] Fwd:
On 20/01/2016 21:26, maryam firoozi via R-help wrote:
> i made a population about 4500 individual.
So you mean nearly 4500, not exactly 4500?
this has two sex(female and male).they had pedigree.
> i wanted to enter new indiviual but their ID of indiviual mustnot be same perivous and their ID number mustnot be bigger than 4500.
> first population's ID number is 1:4500.
If you tabulate ID you will get a table where all the entries should be
1 except for the ID which you have not yet used which will be zero.
All you need to do then is find them
> how can i handel it?
> Sent from my iPhone
> Begin forwarded message:
>> From: maryam firoozi <firoozi_maryam6858 at yahoo.com>
>> Date: January 18, 2016 at 1:14:56 AM GMT+3:30
>> To: r-help at r-project.org
>> we want to do genomic blup in r.i know that use pedigree package.
>> the formule is
>> gblup( P~1,data=ped[,c('ID','P')],M=M,lambda=1/h2-1)
>> P:phenotype variance
>> M: matrix marker or genotype
>> my ped has 4500 ID.but my M has 9000 individual.becasue i have two row for each ID in M matrix becasue each ID has two haplotype.how can i solve it.the formula didnt solve.
>> Sent from my iPhone
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
More information about the R-help