AddTransaction: Add, edit or view transactions

Description Usage Arguments


Add a transaction to the ledger manually via inputs to the console with addTransactionManual, or automatically by reading from a file with addTransactionAuto. You can see what the transactions are that would be automatically entered with viewTransactionsAutoLoad.
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.


addTransactionManual(ledger = viewLedger(file = file),
  file = viewLedgerFile(), description = NULL, budget = NULL,
  date = NULL, account = NULL, amount = NULL)

addTransactionAuto(ledger = viewLedger(file = file),
  file = viewLedgerFile(), data.location = .dataLocation())

viewTransactionsAutoLoad(data.location = .dataLocation(),
  suppress = TRUE)

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

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



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.


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


Prevents it from printing to the console. All low-level functions default to TRUE, while high-level functions that do not have callers and exist for the sole purpose of printing out information default to FALSE.


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


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.


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


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 Dec. 20, 2018, 10:02 a.m.