AddTransaction: Add, edit or view transactions

Description Usage Arguments

Description

Add a transaction to the ledger via inputs to the console with addTransaction.
editTransaction will display the transactions for the given year, month, day. It defaults to show the current month's. If yr, mo, dy is NULL, it will show transactions from all years, months, days, respectively, within the others. It also takes other arguments to narrow the options to show. These options are the same as for viewLedger, because editTransaction will call the former to limit the options shown.
viewLedgerMonth is a convenient wrapper to show the transactions for just the current month. Instead, the functions with date subdivisions are more appropriate. This is the appropriate way to view a reasonable number of transactions at one time. It takes the year, month, and day to prune down the ledger. If any date specification is NULL, it allows all values for that specific date column. year and month default to currentYear() and currentMonth(), while day defaults to all values via NULL. The ledger can further be restricted by including an early or late bound with from and to. These require a Date type. You can use componentsToDate to build one using a year, month, and day. Both methods can be done alone or in tandem.
For a transaction to be shown, it has to fit ALL of the input argument criteria. However, each of the input arguments can be a single value or can be a vector. If one is a vector, a transaction that fits any of the values in the vector will be shown.

Usage

1
2
3
4
5
6
7
8
9
addTransaction(ledger = viewLedger(file = file),
  file = viewLedgerFile(), description = NULL, budget = NULL,
  date = NULL, account = NULL, amount = NULL)

editTransaction(ledger = viewLedger(file = file),
  file = viewLedgerFile(), ...)

viewLedgerMonth(ledger = viewLedger(file = file),
  file = viewLedgerFile())

Arguments

ledger

Data frame ledger. The ledger where each row is a transaction and with columns for year, month, day, description, budget, and one column for each financial account. All columns should be numeric except for description and budget.

file

The path for the ledger for loading and saving. Has an underlying default that needs to be changed in the ViewLedger file.

descriptions

Values in the descriptions column to search for. Uses regular expressions.

budget.categories

Values from the factor column of budget category to search for. Must be exact.

amount.ops, account.amounts

Operators to search transactions. For example, to find transactions where more than one thousand dollars were spent, use amount.ops = `<`, account.amounts = -1000.

account.categories

Restricts the transactions shown to ones where the account(s) in this argument are not 0.

query

Asks the user for descriptions, transaction amounts, etc. manually. Queried values will overwrite the input arguments. Default behavior is to query if all the input options are NULL.


egaffincahn/finances documentation built on Sept. 3, 2019, 1:28 a.m.