My apologies to Eik - I didn't see his solution and essentially replicated
it. Sorry for the noise..
Dennis
On Thu, Feb 10, 2011 at 3:46 PM, Dennis Murphy wrote:
> Hi:
>
> On Thu, Feb 10, 2011 at 10:50 AM, Hui Du wrote:
>
>>
>> Hi all,
>>
>>I have a dataset. Each time I want to
Hi:
On Thu, Feb 10, 2011 at 10:50 AM, Hui Du wrote:
>
> Hi all,
>
>I have a dataset. Each time I want to sample N(i) elements
> from it and I want to repeated sampling M times. N(i) is varied from time to
> time. For example,
>
>dataset = 1:50;
>a
Hi,
try
ds<-1:50
M<-10
n<-sample(5:15,M,replace=T) #generate different n[i]
lapply(1:M,FUN=function(i) sample(ds,n[i]))
hth.
Am 10.02.2011 19:50, schrieb Hui Du:
>
> Hi all,
>
> I have a dataset. Each time I want to sample N(i) elements
> from it and I want to repeated sampli
3 matches
Mail list logo