term_start: Set the start details of a contract

Description Usage Arguments Details Value Examples

Description

This function can be used to specify the start date of a contract.

Usage

1
2
term_start(contract, start_date, event_name = "start_date",
  payment = 0, receipt = 0)

Arguments

contract

The contract for which the start date is to be specified.

start_date

The start date to be specified.

event_name

An optional name for the event. Defaults to "start_date" (which is reccomended).

payment

The amount paid at the start of the contract. Defaults to 0.

receipt

The amount recieved at the start of the contract. Defaults to 0.

Details

Note that receipt and payment cannot both be specified. If they are an error will be thrown.

Value

A contract object with the term added.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
library(magrittr)

contract_a <-
  contract() %>%
  term_start(as.Date("2000/01/01"))

contract_a

contract_a %>% schedule()

contract() %>%
 term_start(as.Date("2000/01/01"), event_name = "purchase date") %>%
 schedule()

contract() %>%
 term_start(as.Date("2000/02/01"), receipt = 1000) %>%
 schedule()

contract() %>%
 term_start(as.Date("2000/03/01"), payment = 50) %>%
 schedule()

jameslairdsmith/contractr documentation built on May 26, 2019, 9:32 a.m.