Vie <wxv579 <at> bham.ac.uk> writes: > > Ive been trying to find a function that will allow me to pull out a number > between a minimum and maximum threshold. > > I want a random decimal number between, for example, 0 and 0.5 or 0 and 0.7. > I've been searching everywhere for a function that will allow me to do this > in R, but I have yet to be successful. Any help would be much appreciated.
assuming you want uniform distribution ?runif These functions provide information about the uniform distribution on the interval from min to max. dunif gives the density, punif gives the distribution function qunif gives the quantile function and runif generates random deviates. Dieter ______________________________________________ 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.