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 <[EMAIL PROTECTED]> [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 > > ______________________________________________ > [EMAIL PROTECTED] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > > ______________________________________________ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
