Skip to content

Instantly share code, notes, and snippets.

@seasmith
Created April 17, 2020 01:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seasmith/2556c1eeef1c79dcc09f043b97f6127d to your computer and use it in GitHub Desktop.
Save seasmith/2556c1eeef1c79dcc09f043b97f6127d to your computer and use it in GitHub Desktop.
Apply aliases
apply_rows <- function (x, fun, ...) apply(x, 1, fun, ...)
apply_columns <- function (x, fun, ...) apply(x, 2, fun, ...)
apply_groups <- function (x, groups, fun, ...) tapply(x, groups, fun, ...)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment