dispatch | R Documentation |
When several persons participate in an event and spendings ares not evenly
distributed among participants, dispatch
provides a clear view of
who owes how much money to whom.
dispatch(balance, order = c("Who", "Whom"), round = 2)
balance |
Numeric vector of length greater or equal to 2. The sum
should equal 0 since |
order |
A character string specifying the sorting method to use for the output. Must be either "Who" (the default) or "Whom" (see examples). |
round |
Integer. With how many digits should amounts owed be displayed. Defaults to 2 |
A 3-column data frame containing the name of the person owing the money, the amount owed and the recipient.
balance <- c(125, 346, -28, -312, -41, -90)
names(balance) <- c("John", "Gail", "Mike", "Lenny", "Christine", "Sally")
dispatch(balance)
dispatch(balance, order="Whom")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.