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

roll on data frame #1

Open
1danjordan opened this issue Sep 26, 2016 · 2 comments
Open

roll on data frame #1

1danjordan opened this issue Sep 26, 2016 · 2 comments

Comments

@1danjordan
Copy link
Owner

Currently roll is unpredictable or breaks if passed anything other than a vector

@1danjordan
Copy link
Owner Author

need to reliably subset rows of data frames or vectors. Could coerce vectors to data frame, subset, compute function then return to vector. Or could find method that reliably subsets rows and elements of both...

@1danjordan
Copy link
Owner Author

Decided roll will only take a vector - data frame or tibbles can be computed on with

df %>% purrr::dmap(roll(.f))

Interactions could be managed by first mutating the df to include the interaction

df %>% mutate(interaction = col_1 * col_2) %>% dmap_at(interaction, roll(.f(.x))

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

1 participant