R/example_cats.R

Defines functions example_cats

Documented in example_cats

#' Example Cats
#'
#' Creates cat data with alignments for use in examples
#'
#' @return a data.frame containing example data for cats
#'
#' @examples
#' example_cats()
#'
#' @export
example_cats <- function() {

  cats <- system.file(c("img/obie.png",
                        "img/jerry.png",
                        "img/gray.png",
                        "img/jeff.png"),
                      package = "ggalignment")

  align_cats <-
    data.frame(img = cats,
               alignment = c("chaotic evil",
                             "chaotic good",
                             "chaotic neutral",
                             "lawful neutral"),
               stringsAsFactors = FALSE)

  return(align_cats)
}

Try the ggalignment package in your browser

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

ggalignment documentation built on Oct. 6, 2021, 9:09 a.m.