Answers for "random number in range r"

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

Browse Popular Code Answers by Language