Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sample(1:6, size=1, replace = TRUE)
- p <- 6/37
- myprobs <- c(2/3 * p, p, p, p, p, 3/2*p)
- set.seed(1)
- x <- sample(1:6, size = 100, replace = TRUE, prob = myprobs)
- barplot(table(x))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement