make_withdraw: Make Withdraw function

Description Usage Arguments Details Value Examples

View source: R/Activity.R

Description

make withdraw from a portfolio

Usage

1
make_withdraw(pobj, date = Sys.Date(), amount, desc = "")

Arguments

pobj

portfolio object

date

date of deposit. Date type

amount

amount of deposit. numeric type

desc

optional description of deposit. string type

Details

subtracts withdraw amount from cash balance and adds record to actvity

Value

updated portfolio object

Examples

1
2
3
4
library(tidyverse)
portfolio("new_port") %>%
make_deposit(date=Sys.Date(), amount = 100) %>%
make_withdraw(date=Sys.Date(), amount = 50)

chrishaarstick/madstork documentation built on Jan. 3, 2022, 8:34 p.m.