Determines if the input data frame or tibble is grouped (using dplyr::group_by()

is_grouped(data)

Arguments

data

input data.frame or tibble

Value

boolean

Examples

df <- data.frame(x = c(1:5), g = c(1, 1, 2, 2, 2)) is_grouped(df)
#> [1] FALSE
is_grouped(dplyr::group_by(df, g))
#> [1] TRUE