Description Usage Arguments Value
View source: R/longest_consecutive.R
calculates the longest consecutive giving streak given giving details for constituents containing a fiscal year field
1 | longest_consecutive(data, ids, fys, fy_range = NA, mode = "append")
|
data |
a data frame with donor ids and the fiscal year of gifts |
ids |
an unquoted column name that contains the constituent IDs |
fys |
an unquote column name that contains the fiscal year for gifts. If not present, run fy() or fy2(). |
fy_range |
the maximum consecutive giving streak to try to find. By default, this uses the maximum range given the fiscal years provided. |
mode |
options for the output mode. By default, "append" creates a new data frame with all provided columns and the consecutive giving years column. There are two other options. "just_consecutive" will provide a table of IDs and values representing the longest consecutive giving streak. "summary" provides a count of donors for every consecutive giving value. |
a data frame of one out three possible options controlled by the value passed to the mode argument
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.