On Sunday, November 18, 2012, Rlotus wrote: > I am a beginner in programmin in general and R specifically. > > I would like to generate a set of random numbers in a normal distribution > but to limit the decimal places in these numbers to only 2. > > I have been using x1 <- runif(1,0,1) to generate my numbers. > > Can I add something to it to enable me to only get results rounded off to 6 > decimal places? > > No, but you can get results from rnorm() and then round() them yourself.
MW > > > -- > View this message in context: > http://r.789695.n4.nabble.com/Decimal-places-tp4649959.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org <javascript:;> mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.