Re: [R] generate a vector of random numbers within confines of certain parameters

2016-08-02 Thread Bert Gunter
All floating point operations are done to machine precision -- roughly 16 digits. See ?.Machine . You can choose to round, truncate, or display to anything less than that that you care to. See also the digits parameter of ?options The rest of your post is ambiguous to me. But note that (all?/most

Re: [R] generate a vector of random numbers within confines of certain parameters

2016-08-02 Thread Jeff Newmiller
x <- rnorm( 2, 5, 2.5 ) The requirement for "random" is ill-specified because it omits mention of which random distribution you want (I assumed normal distribution above). The requirement for "decimal places" is ill-defined because floating point numbers are internally represented with mant

Re: [R] generate a vector of random numbers within confines of certain parameters

2016-08-02 Thread David L Carlson
-Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of David L Carlson Sent: Tuesday, August 2, 2016 2:40 PM To: Adrian Johnson; r-help Subject: Re: [R] generate a vector of random numbers within confines of certain parameters Try > set.seed(42) > x1 <- ro

Re: [R] generate a vector of random numbers within confines of certain parameters

2016-08-02 Thread David L Carlson
ian Johnson Sent: Tuesday, August 2, 2016 1:57 PM To: r-help Subject: [R] generate a vector of random numbers within confines of certain parameters Dear group, I am trying to generate a vector of random numbers for 20K observation. however, I want to generate numbers (with 6 decimal places) within th

[R] generate a vector of random numbers within confines of certain parameters

2016-08-02 Thread Adrian Johnson
Dear group, I am trying to generate a vector of random numbers for 20K observation. however, I want to generate numbers (with 6 decimal places) within the range of Std. Dev : 2-3 mean : 4-6 Is there a method to generate numbers with 6 decimal places under these parameters thank you. Adrian __