Re: [R] Generate N random numbers with a given probability and condition

2018-07-12 Thread David Winsemius
> On Jul 12, 2018, at 12:44 AM, Göran Broström wrote: > > "Acceptance–Rejection Sampling from the Conditional Distribution of > Independent Discrete Random Variables, given their Sum", Statistics 34, pages > 247-257 Dear Go:ran; I'm fully retired with no subscriber academic library that I c

Re: [R] Generate N random numbers with a given probability and condition

2018-07-12 Thread Göran Broström
On 2018-07-05 00:21, Nelly Reduan wrote: Dear all, I would like to generate N random numbers with a given probability and condition but I'm not sure how to do this. For example, I have N = 20 and the vector from which to choose is seq(0, 10, 1). I have tested: x <- sample(seq(0, 10, 1), 20

Re: [R] Generate N random numbers with a given probability and condition

2018-07-11 Thread Duncan Murdoch
On 04/07/2018 6:21 PM, Nelly Reduan wrote: Dear all, I would like to generate N random numbers with a given probability and condition but I'm not sure how to do this. For example, I have N = 20 and the vector from which to choose is seq(0, 10, 1). I have tested: x <- sample(seq(0, 10, 1), 20,

Re: [R] Generate N random numbers with a given probability and condition

2018-07-11 Thread Jim Lemon
t; ________________ > De : Jim Lemon > Envoyé : mardi 10 juillet 2018 17:44:13 > À : Nelly Reduan > Objet : Re: [R] Generate N random numbers with a given probability and > condition > > Hi Nell, > I may not have the right idea about this, but I think you

Re: [R] Generate N random numbers with a given probability and condition

2018-07-11 Thread Nelly Reduan
lements of a vector rather than to permute a vector ? Many thanks for your time. Have a nice day Nell De : Jim Lemon Envoyé : mardi 10 juillet 2018 17:44:13 À : Nelly Reduan Objet : Re: [R] Generate N random numbers with a given probability and condition Hi N

Re: [R] Generate N random numbers with a given probability and condition

2018-07-10 Thread Bert Gunter
__ > De : Rolf Turner > Envoyé : mercredi 4 juillet 2018 16:11:11 > À : Nelly Reduan > Cc : r-help@r-project.org > Objet : Re: [R] Generate N random numbers with a given probability and > condition > > > On 05/07/18 10:21, Nelly Reduan wrote: &g

Re: [R] Generate N random numbers with a given probability and condition

2018-07-10 Thread Jim Lemon
juillet 2018 16:11:11 > À : Nelly Reduan > Cc : r-help@r-project.org > Objet : Re: [R] Generate N random numbers with a given probability and > condition > > > On 05/07/18 10:21, Nelly Reduan wrote: > >> Dear all, >> >> I would like to generate N random numbe

Re: [R] Generate N random numbers with a given probability and condition

2018-07-10 Thread Nelly Reduan
numbers with a given probability and condition On 05/07/18 10:21, Nelly Reduan wrote: > Dear all, > > I would like to generate N random numbers with a given probability and > condition but I'm not sure how to do this. > For example, I have N = 20 and the vector from which to choos

Re: [R] Generate N random numbers with a given probability and condition

2018-07-04 Thread Rolf Turner
On 05/07/18 10:21, Nelly Reduan wrote: Dear all, I would like to generate N random numbers with a given probability and condition but I'm not sure how to do this. For example, I have N = 20 and the vector from which to choose is seq(0, 10, 1). I have tested: x <- sample(seq(0, 10, 1), 20,

Re: [R] Generate N random numbers with a given probability and condition

2018-07-04 Thread Jeff Newmiller
This looks like homework (which is off topic here per the Posting Guide). Also, please send your emails in plain text format to avoid us seeing your message differently than you do. On July 4, 2018 3:21:34 PM PDT, Nelly Reduan wrote: >Dear all, > >I would like to generate N random numbers with