R/sample_dat.R

#' Sample Data
#'
#' A sample dataset modified from the dataset starwars in tidyverse.
#'
#'
#' Generated by the following syntax:
#' sample_dat = starwars \%>\%  mutate(haircolor = ifelse(hair_color \%in\% c('black', 'brown', 'none'), hair_color, 'other')) \%>\% select(height, sex, gender, mass, haircolor) \%>\% filter(!is.na(gender))
#'
#' @docType data
#'
#' @usage data(sample_dat)
#'
#' @format a tibble(dataframe)
#'
#' @keywords datasets
#'
#'
#' @examples
#' data(sample_dat)
#' head(sample_dat)
#' str(sample_dat)
"sample_dat"
JiyueQin/tidyreport documentation built on Nov. 24, 2024, 9:24 a.m.