1 | gs_fct(.data, colname, fcts, splits)
|
.data |
(required) the source data |
colname |
(required) the column name for this created col |
fcts |
(required) the factors that need to be expanded into rows based on splits |
splits |
(required) the |
the appended dataframe with a numeric vector added as the last col Proving fcts = c("M" , "F") with splits = c(.3,.7) will randomly allocate 30 gs_fct(.data = mtcars , colname = "sex", fcts = c("M", "F"), splits = c(.3, .7))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.