ViewLedger: Load, save, and view a ledger

Description Usage Arguments Details Value

Description

These are the lowest level functions that have the default ledger locations for loading, saving, and viewing. Higher functions call these to perform these functions or by passing down the chain custom ledgers and file paths or by allowing these to use the defaults.

Usage

1
2
3
4
5
6
7
8
saveLedger(ledger, file = viewLedgerFile())

viewLedger(ledger = read.csv(file), file = viewLedgerFile(),
  from = as.Date("1900-01-01"), to = Sys.Date(), on = NULL,
  descriptions = NULL, budgets = NULL, amount.ops = NULL,
  amounts = NULL, accounts = NULL, suppress = TRUE)

viewLedgerFile(file = NULL, suppress = TRUE)

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.

from, to

Boundaries on the ledger dates. Requires Date class.

suppress

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.

yr, mo, dy

Year, month, day. When one of these is NULL, function behavior is to allow all possible values.

Details

viewLedger does the loading of the ledger and is called by many other functions. Can be used to manually manipulate by calling, and to view it by calling with suppress = FALSE. Therefore, calling viewLedger with suppress = FALSE is not recommended, as it will print out a large dataset to the console.

Value

viewLedger and each of its date components return a data frame ledger. viewLedgerFile returns the character path to the ledger.


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