Skip to contents

Remove grouping from a grouped tidymatrix

Usage

# S3 method for class 'grouped_tidymatrix'
ungroup(x, ...)

Arguments

x

A grouped_tidymatrix object

...

Not used

Value

A tidymatrix object (ungrouped)

Examples

library(dplyr, warn.conflicts = FALSE)
tm <- tidymatrix(big5_responses, big5_respondents, big5_items)

grouped <- tm |>
  activate(rows) |>
  group_by(country)

ungroup(grouped)
#> # A tidymatrix: 400 x 30 matrix
#> # Active: rows
#> #
#> # Row data: 400 rows x 8 columns
#> # Column data: 30 rows x 5 columns
#> #
#> # Active data (rows):
#> # A tibble: 6 × 8
#>   respondent_id   age gender education occupation     country life_satisfaction
#>   <chr>         <int> <chr>  <fct>     <chr>          <chr>               <int>
#> 1 R001             52 Female Secondary Service/Manual EE                      8
#> 2 R002             32 Female Master    Office         FI                      4
#> 3 R003             66 Male   Bachelor  Office         EE                      6
#> 4 R004             42 Male   Bachelor  Professional   EE                      9
#> 5 R005             48 Female Secondary Office         FI                      8
#> 6 R006             62 Female Basic     Service/Manual EE                      4
#> # ℹ 1 more variable: completion_min <dbl>