library(poorman)
#>
#> I'd seen my father. He was a poor man, and I watched him do astonishing things.
#> - Sidney Poitier
#>
#> Attaching package: 'poorman'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
min_max <- list(
min = ~min(.x, na.rm = TRUE),
max = ~max(.x, na.rm = TRUE)
)
dplyr::starwars %>%
summarise(across(where(is.numeric), min_max, .names = "{.fn}.{.col}"))
#> X..fn....col. NA. NA..1 NA..2 NA..3 NA..4
#> 1 66 264 15 1358 8 896
library(poorman)
#>
#> I'd seen my father. He was a poor man, and I watched him do astonishing things.
#> - Sidney Poitier
#>
#> Attaching package: 'poorman'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
min_max <- list(
min = ~min(.x, na.rm = TRUE),
max = ~max(.x, na.rm = TRUE)
)
dplyr::starwars %>%
summarise(across(where(is.numeric), min_max, .names = "{.fn}.{.col}"))
#> min.height max.height min.mass max.mass min.birth_year max.birth_year
#> 1 66 264 15 1358 8 896
Note that the function stolen from gluestick is under the MIT license, which says that "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.". Not sure what it means but maybe you know.
Related to #52.
Before:
Created on 2022-07-28 by the reprex package (v2.0.1)
After:
Created on 2022-07-28 by the reprex package (v2.0.1)
Note that the function stolen from
gluestick
is under the MIT license, which says that "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.". Not sure what it means but maybe you know.