Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: pairwise function #25

Open
wvictor14 opened this issue Jul 26, 2019 · 1 comment
Open

Feature request: pairwise function #25

wvictor14 opened this issue Jul 26, 2019 · 1 comment

Comments

@wvictor14
Copy link

I was wondering if there was a function that takes the pairwise differences (A-B)... And then I realized maybe having a function that applies any function and applies it in a pairwise manner. Something like:

# subtract
df %>% 
  pairwise(.f = '-')

# add
df %>% 
  pairwise(.f = '+')

# multiply
df %>% 
  pairwise(.f = '*')

Would this be useful? If there's interest I might try implementing something like that.

@ApexHeel
Copy link

ApexHeel commented Apr 8, 2021

This would be really useful. I thought I could figure out how to add my own function ahead of squarely, but ran into a wall.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants