Understanding glimpse() output in r

574 Views Asked by At

When I run:

CO2 %>%
  group_by(Plant, Type, Treatment) %>%
  summarize(count = n()) %>%
  glimpse()

...I see the following output:

Observations: 12
Variables: 4
Groups: Plant, Type [?]
$ Plant     <ord> Qn1, Qn2, Qn3, Qc1, Qc3, Qc2, Mn3, Mn2, Mn1, Mc2, Mc3, Mc1
$ Type      <fct> Quebec, Quebec, Quebec, Quebec, Quebec, Quebec, Mississippi…
$ Treatment <fct> nonchilled, nonchilled, nonchilled, chilled, chilled, chill…
$ count     <int> 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7

...what does the "[?]" signify in the line "Groups: Plant, Type [?]" ?

Why do we not instead see: "Groups: Plant, Type, Treatment" since those are the 3 fields against which we grouped the data?

0

There are 0 best solutions below