iris2: Modified 'iris' dataset

iris2R Documentation

Modified iris dataset

Description

Modified iris dataset so:

  • every column is labelled (using label attribute)

  • Species column is considered as factor

See iris for more informations on the original "Edgar Anderson's Iris Data" dataset.

Usage

iris2

Format

A data frame with 150 observations on 5 variables with labels.

Source

library(dplyr)
iris2 = iris %>%
    expss::apply_labels( #I also could have used [import_labels] or even `labelled::set_variable_labels()`
        Species = "Specie",
        Sepal.Length = "Length of Sepal",
        Sepal.Width = "Width of Sepal",
        Petal.Length = "Length of Petal",
        Petal.Width = "Width of Petal"
    ) %>%
    as_tibble()

Examples

library(crosstable)
ct=crosstable(iris2, by=Species)
ct
as_flextable(ct)

crosstable documentation built on Nov. 13, 2023, 1:08 a.m.