Answers for "random number generator in r"

2

random integer in r

random_x <- sample(1:10, 1)

# or

random_10x = sample(-1:1, size = 10, replace = T)
Posted by: Guest on September-09-2020
1

random number seed r

// R Language
set.seed(1)
rnorm(10)
Posted by: Guest on November-07-2020

Code answers related to "random number generator in r"

Browse Popular Code Answers by Language