sample_vector: CDU data science team ggplot2 theme

View source: R/sample_vector.R

sample_vectorR Documentation

CDU data science team ggplot2 theme

Description

A ggplot2 theme with a white panel background, no grid lines, large axis and legend titles, and increased text padding for better readability.

Usage

sample_vector(values, weights, length)

Arguments

values

Vector- the thing you want to sample from

weights

vector of integers the same length as values- the proportions with which you want to sample

length

integer- how long you want the return value to be- e.g. the number of rows in a dataframe

Examples

sample_vector(values = c(NA, "Male", "Female", "Other"),
weights = c(10, 50, 50, 2),
length = 100)


CDU-data-science-team/nottshcMethods documentation built on March 19, 2023, 11:54 a.m.