register | R Documentation |
register
imports the register from a ledger, hledger, or beancount file as a tibble.
register(file, ..., toolchain = default_toolchain(file), date = NULL)
register_beancount(file, date = NULL)
register_hledger(
file,
flags = "",
date = NULL,
add_mark = TRUE,
add_cost = TRUE,
add_value = TRUE
)
register_ledger(file, flags = "", date = NULL)
file |
Filename for a ledger, hledger, or beancount file. |
... |
Arguments passed on to either |
toolchain |
Toolchain used to read in register. Either "ledger", "hledger", "beancount", "bean-report_ledger", or "bean-report_hledger". |
date |
End date. Only transactions (and implicitly price statements) strictly before this date are used. |
flags |
Character vector of additional command line flags to pass
to either |
add_mark |
Whether to add a column with the mark information. Only relevant for hledger files. |
add_cost |
Whether to add historical cost columns. Only relevant for hledger files. |
add_value |
Whether to add market value columns. Only relevant for hledger files. |
register
returns a tibble.
if (Sys.which("ledger") != "") {
example_ledger_file <- system.file("extdata", "example.ledger", package = "ledger")
dfl <- register(example_ledger_file)
head(dfl)
}
if (Sys.which("hledger") != "") {
example_hledger_file <- system.file("extdata", "example.hledger", package = "ledger")
dfh <- register(example_hledger_file)
head(dfh)
}
if (Sys.which("bean-query") != "") {
example_beancount_file <- system.file("extdata", "example.beancount", package = "ledger")
dfb <- register(example_beancount_file)
head(dfb)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.