Skip to content

Feature request: combining different summarise functions #3

@camnesia

Description

@camnesia

I went through the documentation and was unable to find a way to combine different summarise functions. Summarise_vars would also need a .names ability to work in such a manner.

iris %>%
  as.data.table() %>%
  tidyft::arrange(Sepal.Length) %>%
  tidyft::summarise(Sepal_legth_Max = max(Sepal.Length), by = Species) %>%
  summarise_when(Petal.Length > 2, Petal_Length_avg = mean(Petal.Length), by = Species) %>%
  summarise_vars('Width', .func = function(x) na.omit(first(x)), by = Species) %>%
  summarise_vars('Width', .func = function(x) na.omit(last(x)), by = Species)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions