Donor→Recipient: Reciprocity Ratio
Source:R/indicator_donor_recipient_reciprocity.R
indicator_donor_recipient_reciprocity.RdIdentifies donor–recipient pairs where both have exchanged funding (each organization acts as donor and recipient at least once).
Usage
indicator_donor_recipient_reciprocity(
flows,
donor_recipient_pairs = NULL,
donors = NULL,
recipient_name = NULL
)Arguments
- flows
A dataframe with
sourceObjects,destinationObjects, andamountUSD.- donor_recipient_pairs
(optional) A dataframe of donor–recipient pairs to merge results with.
- donors
(optional used if recipient_name is provided ) A dataframe with donor names to merge with the results.
- recipient_name
(optional) the name of a specific recipient to filter the results of the function
Value
A list with a tibble with donor, recipient,
and DonorRecipient_Reciprocity_Ratio (0 or 1) and a plot.
Details
Goal: Checks whether a donor and recipient have mutual funding roles (both send and receive) — useful for consortia or pooled mechanisms.
Examples
result <- indicator_donor_recipient_reciprocity(flows)
print(result$plot)
#> `stat_bin()` using `bins = 30`. Pick better value `binwidth`.