Description Usage Arguments Value Examples
View source: R/generate_virtual_pop.R
This function creates a population from a distribution.
1 | generate_virtual_pop(N, var_name, dist, ...)
|
N |
The numbers of samples |
var_name |
the variable name that we need to create |
dist |
the distribution function for random variables (starts with 'r', i.e. rnorm, rpois, rexp) |
... |
for the dist function |
a tibble that stores the virtual population
1 2 | generate_virtual_pop(100, "height", rnorm, 0, 1)
generate_virtual_pop(100, "n_accidents_per_hr", rpois, 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.