Re: [R] Generating Numbers With Certain Distribution in R

2009-02-11 Thread Gundala Viswanath
Dear all, Thanks so much, the latest version by Gustav work just fine. In the first version, the outcome is more digital than contiguous. - Gundala Viswanath Jakarta - Indonesia On Wed, Feb 11, 2009 at 10:35 PM, Gustaf Rydevik wrote: > On Wed, Feb 11, 2009 at 2:15 PM, Ben Bolker wrote: >> Be

Re: [R] Generating Numbers With Certain Distribution in R

2009-02-11 Thread Ben Bolker
Gustaf Rydevik wrote: > On Wed, Feb 11, 2009 at 2:15 PM, Ben Bolker wrote: >> Bernardo Rangel Tura wrote: >> >>> I think your routine need a little fix >>> >>> x <- rlnorm(1e6,meanlog=1,sdlog=1) ## pick any parameters you like >>> y <- round((x-min(x)/diff(range(x)))*19+1) >>> >>> What you thi

Re: [R] Generating Numbers With Certain Distribution in R

2009-02-11 Thread Gustaf Rydevik
On Wed, Feb 11, 2009 at 2:15 PM, Ben Bolker wrote: > Bernardo Rangel Tura wrote: > >> I think your routine need a little fix >> >> x <- rlnorm(1e6,meanlog=1,sdlog=1) ## pick any parameters you like >> y <- round((x-min(x)/diff(range(x)))*19+1) >> >> What you think? > > Yes. No. Bernardo mis

Re: [R] Generating Numbers With Certain Distribution in R

2009-02-11 Thread Ben Bolker
Bernardo Rangel Tura wrote: > I think your routine need a little fix > > x <- rlnorm(1e6,meanlog=1,sdlog=1) ## pick any parameters you like > y <- round((x-min(x)/diff(range(x)))*19+1) > > What you think? Yes. __ R-help@r-project.org mailing li

Re: [R] Generating Numbers With Certain Distribution in R

2009-02-11 Thread Bernardo Rangel Tura
On Wed, 2009-02-11 at 04:07 +, Ben Bolker wrote: > Gundala Viswanath gmail.com> writes: > > > > > Dear all, > > > > Is there a way to generate K numbers of integer (K = 10^6). > > The maximum value of the integer is 200,000 and minimum is 1. > > > > And the occurrences of this integer foll

Re: [R] Generating Numbers With Certain Distribution in R

2009-02-10 Thread Ben Bolker
Gundala Viswanath gmail.com> writes: > > Dear all, > > Is there a way to generate K numbers of integer (K = 10^6). > The maximum value of the integer is 200,000 and minimum is 1. > > And the occurrences of this integer follows > a lognormal distribution. > > - Gundala Viswanath > Jakarta - I

[R] Generating Numbers With Certain Distribution in R

2009-02-10 Thread Gundala Viswanath
Dear all, Is there a way to generate K numbers of integer (K = 10^6). The maximum value of the integer is 200,000 and minimum is 1. And the occurrences of this integer follows a lognormal distribution. - Gundala Viswanath Jakarta - Indonesia __ R-help