ggstatsplot (version 0.1.2)

grouped_list: Split dataframe into a list by grouping variable.

Description

This function splits the dataframe into a list, with the length of the list equal to the factor levels of the grouping variable. Each element of the list will be a tibble.

Usage

grouped_list(data, grouping.var = NULL)

Arguments

data

A dataframe (or a tibble) from which variables specified are to be taken. A matrix or tables will not be accepted.

grouping.var

A single grouping variable (can be entered either as a bare name x or as a string "x").

Examples

Run this code
# NOT RUN {
ggstatsplot:::grouped_list(data = ggplot2::msleep, grouping.var = vore)
# }

Run the code above in your browser using DataLab