add: Add new items to a budget.

Description Usage Arguments Examples

Description

Main functions for adding income channels and expenses to a budget.

Usage

1
2
3
add_income(budget, name, amount, category, owner, months = 1:12)

add_expense(budget, name, amount, category, owner, months = 1:12)

Arguments

budget

Budget object to add to.

name

Name of the item.

amount

Money amount.

Can be either a single numeric, or a vector. If vector, its length should evenly divide that of 'months'.

category

Category of income or expense.

For example '"housing"', '"savings"', etc.

owner

Name of the person whose item this is.

Used to generate individual budgets from joint budgets.

months

Vector of integers corresponding to the months in which the income/expense is active.

Examples

1
2
3
mybudget <- budget() %>%
  add_income("su", 5300, "grants", "Janus") %>%
  add_expense("rent", 3700, "housing", "Janus")

janusvm/tidybudget documentation built on May 18, 2019, 2:39 p.m.