x <- rnorm(1, mean = 2.5, sd = 1) x <- abs(as.numeric(format(round(x, 0)))) x #Pulls a number at random then rounds it. #If I get 0 or greater than 5 then I just re-roll. #I could code the re-roll in but I am being lazy. [1] 2
sample(1:5, 1) #Pulls one random sample from 1 to 5 [1] 3
Get involved in philosophical discussions about knowledge, truth, language, consciousness, science, politics, religion, logic and mathematics, art, history, and lots more. No ads, no clutter, and very little agreement — just fascinating conversations.