Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?... Nom : non disponible URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20100404/6f9d26c0/attachment.pl>
On Sun, 2010-04-04 at 04:03 -0700, kende jan wrote:> Hello, > How can I generate randomly in R a sample of skewed data with first quartile is 540 and third quartile is 715. > I need a sample of 100 cases. > > Thank you for your help > > Jan >Hi Jan, Sorry my direct approach but why you don't use data <- c(runif(25,number,540),runif(50,540,715),runif(25,715,number)) -- Bernardo Rangel Tura, M.D,MPH,Ph.D National Institute of Cardiology Brazil
On Apr 4, 2010, at 7:03 AM, kende jan wrote:> > Hello, > How can I generate randomly in R a sample of skewed data with first > quartile is 540 and third quartile is 715. > I need a sample of 100 cases.?rlnorm>-- David Winsemius, MD West Hartford, CT
Is this close enough?> x <- runif(100000, 452.5, 802.5) > quantile(x)0% 25% 50% 75% 100% 452.5014 539.2777 627.4728 715.2990 802.4815> y <- sample(x, 100) >On Sun, Apr 4, 2010 at 7:03 AM, kende jan <kendejan@yahoo.fr> wrote:> > Hello, > How can I generate randomly in R a sample of skewed data with first > quartile is 540 and third quartile is 715. > I need a sample of 100 cases. > > Thank you for your help > > Jan > > > > > [[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<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. >-- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve? [[alternative HTML version deleted]]