Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Received-SPF: none (hypatia: domain of sokamp at web.de does not designate permitted sender hosts) X-Virus-Scanned: by amavisd-new at stat.math.ethz.ch X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on hypatia.math.ethz.ch X-Spam-Level: *** X-Spam-Status: No, hits=3.2 required=5.0 tests=AWL,BAYES_60,RCVD_IN_BL_SPAMCOP_NET autolearn=no version=2.63 Hello, I want to validate my data for working with CART. I need to now how to create a randomized column of some 6800 intgers within R . I did not understand the manual concerning the possibilities to random data, sorry. Thanks a lot for your help! Susanne Osterkamp
Hi Susanne, * Susanne Osterkamp <sokamp at web.de> [040819 15:52]:> Hello, > > I want to validate my data for working with CART. > I need to now how to create a randomized column of some 6800 intgers > within R.Do you want to sample 6800 random integers? In that case try ?runif (for uniform distribution) If you want to resample 6800 integers try ?sample HTH Olaf Mersmann
Use sample() in either case: ## randomly shuffle the elements of the vector `x': rx <- sample(x, replace=FALSE) ## randomly draw 6800 integers between 1 and 6800: x <- sample(6800, 6800, replace=TRUE) Andy> From: Olaf Mersmann > > Hi Susanne, > * Susanne Osterkamp <sokamp at web.de> [040819 15:52]: > > Hello, > > > > I want to validate my data for working with CART. > > I need to now how to create a randomized column of some 6800 intgers > > within R. > > Do you want to sample 6800 random integers? In that case try ?runif > (for uniform distribution) > > If you want to resample 6800 integers try ?sample > > HTH > Olaf Mersmann > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > >
Reasonably Related Threads
- scan and skip - without line breaks in the input file
- Fitting Mixture of Non-Central Student's t Distributions
- Virtualization Digest, Vol 60, Issue 17
- Virtualization Digest, Vol 60, Issue 17
- Mailing List Admin - Remove annoying user [Fwd: RE: Re: Get the Caller-ID without Answering]