budget: Reference class budget

Description Usage Format Value Methods Author(s) Examples

Description

This class holds and manages accounts, transactions and categories. It can be ititialized with special RDS file or by add* methods. It also allows to save the state in RDS file. This file is a simple copy of private members.

Usage

1

Format

R6Class object.

Value

object of R6Class with budget storage and interface methods

Methods

new(path = NULL)

Object creator. You can provide path to RDS file or initialize empty object

save(path)

Save budget to RDS file

addCategory(category, budgetCat = rep(private$budgetCats[1], length(category)))

Add transaction category(ies) to budget along with budget category

deleteCategory(category)

Delete transaction category(ies) from budget

getCategories()

Return category vector

moveCategory(oldCategory, newCategory)

Move old category to new one

updateSystemCategories()

Set system categories to valid values

addBudgetCategory(budgetCat)

Add transaction budget category(ies) to budget

deleteBudgetCategory(budgetCat)

Delete transaction budget category(ies) from budget

getBudgetCategories()

Return budget category vector

addAccount(account, initialBalance = rep(0, length(account)))

Add account(s) to budget

deleteAccount(account)

Delete account(s) from budget

renameAccount(account, newName)

Rename account

setAccountInitialBalance(account, initialBalance = rep(0, length(account)))

Set new account(s) initial balance(s)

getAccounts()

Return accounts vector

getAccountInitialBalances()

Return account initial balances vector

getAccountBalances()

Return account balances vector

addTransaction(account, transaction, autoSys = TRUE)

Add transaction(s) to account

deleteTransaction(account, trIds, autoSys = TRUE)

Delete transaction(s) from account

getTransactionTable(account)

Get transaction table for account

addReport(report)

Add report to budget

deleteReport(name)

Delete report from budget

getReport(name)

Getreport

Author(s)

Daniel Rodak

Examples

1
2
3
4
myBudget <- budget$new()
## Not run: 
myBudget <- budget$new("path/to/budget.rds")
## End(Not run)

daniel-rodak/budgetr documentation built on May 25, 2019, 4:22 p.m.