swirldev / swirl_courses

:mortar_board: A collection of interactive courses for the swirl R package.
http://swirlstats.com
Other
4.32k stars 7.24k forks source link

rpois additional possible answer R Programming Simulation #392

Open surfer190 opened 6 years ago

surfer190 commented 6 years ago

In the R Programming, Simulation course there is the following question:

Generate 5 random values from a Poisson distribution with mean 10. Check out the
| documentation for rpois() if you need help.

This fails:

> rpois(5, lambda=c(10))
[1]  7  4  9 11 13

| Not quite! Try again. Or, type info() for more options.

| Use rpois(5, 10) to generate 5 random numbers from a Poisson distribution with mean 10.

yet this passes:

> rpois(5, lambda=10)
[1]  9  7  6 12  6

| You nailed it! Good job!