View source: R/simulate_obesity.R
simulate_obesity | R Documentation |
Simulate obesity status
simulate_obesity(
x,
obes_prev = "OBESITY_CrudePrev",
obes_sd = "OBESITY_SD",
obes_label = "FIPS",
n = 1000
)
x |
data frame containing obesity data as a percentage from 0 to 100. |
obes_prev |
column name of prevalence. |
obes_sd |
column name of standard deviation. |
obes_label |
column name of labeling term, required if |
n |
simulated sample size. |
List of arrays containing simulated obesity status.
# Input has default column names
df <- data.frame(OBESITY_CrudePrev = c(20, 50, 80),
OBESITY_SD = c(5, 5, 5),
FIPS = letters[1:3])
simulate_obesity(df, n = 5)
# Input has custom column names
df <- data.frame(prev = c(20, 50, 80),
sd = c(5, 5, 5),
label = letters[1:3])
simulate_obesity(df,
obes_prev = "prev",
obes_sd = "sd",
obes_label = "label",
n = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.