ÎncepețiÎncepe gratuit

Combining count() with across()

The count() function also works with across() to provide the number of rows matching each combination of the variables specified. You can, thus, get how many rows correspond to different variable combinations in the imf_data with this pairing.

Acest exercițiu face parte din cursul

Programming with dplyr

Vezi cursul

Instrucțiuni pentru exercițiu

  • count() across character class columns.
  • Arrange the count tibble with count decreasing.

Exercițiu interactiv practic

Încearcă acest exercițiu completând acest cod de exemplu.

imf_data %>% 
  count(
    # Count over character class columns
    ___(
    ___(___)
  	),
    # Arrange the results by descending count
    ___)
Editează și rulează codul