R/data-rvary2.R

#' @title
#' rvary2 from Stata - simple tables for categorival variables
#'
#' @description
#' 5 different raters could rate 10 subjects with levels 1, 2, 3
#'
#' @format A tibble with 10 observations (1, 2, 3) on 5 variables representing
#'   different raters and one variable for subject ID.
#' \describe{
#'   \item{subject}{Subject ID}
#'   \item{rater1}{a factor including the diagnoses of rater 1 (levels see above)}
#'   \item{rater2}{a factor including the diagnoses of rater 2 (levels see above)}
#'   \item{rater3}{a factor including the diagnoses of rater 3 (levels see above)}
#'   \item{rater4}{a factor including the diagnoses of rater 4 (levels see above)}
#'   \item{rater5}{a factor including the diagnoses of rater 5 (levels see above)}
#' }
#'
#' @references
#' [Datasets for Stata Base Reference Manual, Release 13](https://www.stata-press.com/data/r13/r.html#r)
#' @source
#' [Datasets for Stata Base Reference Manual, Release 13](https://www.stata-press.com/data/r13/r.html#r)
#'
#' @examples
#' rvary2
#'
#' library(dplyr)
#' library(tidyr)
#' rvary2 %>%
#'   tidyr::gather(.,
#'                 key = "rater",
#'                 value = "rating",
#'                 dplyr::starts_with("rater")) %>%
#'   with(., table(subject, rating))
"rvary2"
emilelatour/lagree documentation built on Sept. 18, 2024, 5:19 p.m.