Learn R Programming

businessPlanR (version 0.1-0)

first_last: Shortcut for lists with steady transactions.

Description

Generates a list of two elements, first and last month of the full years range, both with the same value specified.

Usage

first_last(years, value)

Value

A list with two elements named after the first and last month of the years' range in YYYY.MM format.

Arguments

years

Integer vector, at least two elements, the range of years to cover.

value

The transaction amount that is assumed to remain unchanged over all years.

Details

You can use this in combination with the .list argument of expense, revenue, and transaction.

Examples

Run this code
expense(
    type="Operation",
    category="Bank",
    name="Accounting",
    missing="rep",
    .list=first_last(2022:2025, value=20)
)

Run the code above in your browser using DataLab