gs_fct: Splits a set of factors as per the splits provided

Usage Arguments

View source: R/sim.R

Usage

1
gs_fct(.data, colname, fcts, splits)

Arguments

.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))


shambhu112/gsim documentation built on Jan. 21, 2021, 6:20 p.m.