DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Random Numbers In R

  • submit to reddit
        // Use runif to generate 10 random numbers between 1 and 30.
//as.integer converts the returned values into ints.

as.integer(runif(10, 1, 30))