| preprocess_inputs | R Documentation |
These functions are named after the tidyverse functions select, summarize,
nest, pack, pivot_wider and pivot_longer and are designed to avoid
repetition of key columns when preprocessing the data for a join. They should
only be used in the x and y arguments of powerjoin join functions. No
further transformation should be applied on top of them.
select_keys_and(.data, ...) summarize_by_keys(.data, ...) nest_by_keys(.data, ..., name = NULL) pack_along_keys(.data, ..., name) complete_keys(.data)
.data |
A data frame to pivot. |
... |
Additional arguments passed on to methods. |
name |
Name of created column |
Unlike their tidyverse counterparts these just add an attribute to the input and don't reshape it. The join function then preprocesses the inputs using these attributes and the keys.
A data frame identical to the .data but with a "powerjoin_preprocess"
attribute to be handled by the join functions
# in practice you'll mostly use those in join function calls directly x <- select_keys_and(head(iris, 2), Sepal.Width) # all it does is add an attribute that will be processed by the join function attr(x, "powerjoin_preprocess") # see `?power_left_join` or README for practical examples
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.