R/children.R

##' Generate Random Vector of Number of Children
#'
#' Generate a random vector of number of children.
#'
#' @inheritParams r_sample_factor
#' @return Returns a random vector of number of children elements.
#' @keywords children
#' @export
#' @include utils.R r_sample.R
#' @family variable functions
#' @examples
#' children(10)
#' pie(table(children(100)))
children <- hijack(r_sample,
    name = "Children",
    x = 0:10,
    prob = c(.25, .25, .15, .15, .1, rep(.1/5, 4), .01, .01)
)

Try the wakefield package in your browser

Any scripts or data that you put into this service are public.

wakefield documentation built on Sept. 14, 2020, 1:07 a.m.