| iris2 {crosstable} | R Documentation |
Modified iris dataset
Description
Modified iris dataset so:
every column is labelled (using
labelattribute)-
Speciescolumn 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)
[Package crosstable version 0.7.0 Index]