Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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. Other data types (e.g., matrix,table, array, etc.) 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

ggstatsplot:::grouped_list(data = ggplot2::msleep, grouping.var = vore)

ggstatsplot

'ggplot2' Based Plots with Statistical Details

v0.7.2
GPL-3 | file LICENSE
Authors
Indrajeet Patil [cre, aut, cph] (<https://orcid.org/0000-0003-1995-6531>, @patilindrajeets)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.