R/marital.R

#' Generate Random Vector of Marital Statuses
#'
#' Generate a random vector of marital statuses.
#'
#' @inheritParams r_sample_factor
#' @return Returns a random vector of marital status elements.
#' @keywords marital married divorce widow
#' @export
#' @include utils.R r_sample.R
#' @family variable functions
#' @examples
#' marital(10)
#' barplot(table(marital(10000)))
marital <- hijack(r_sample_factor,
    name = "Marital",
    x = c("Married", "Divorced", "Widowed", "Separated", "Never Married")
)

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.