Learn R Programming

DescTools (version 0.99.37)

PlotCashFlow: Cash Flow Plot

Description

A cash flow plot is a plot used in finance and allows you to graphically depict the timing of the cash flows as well as their nature as either inflows or outflows. An "up" arrow represents money received and a "down" arrow money paid out.

Usage

PlotCashFlow(x, y, xlim = NULL, labels = y, mar = NULL, 
             cex.per = par("cex"), cex.tck = par("cex") * 0.8, 
             cex.cash = par("cex"))

Arguments

x

time period of the cashflows (in and out)

y

amount of the cashflows

xlim

range of the x-axis, defaults to range(x).

labels

the labels of the cashflows will be printed outside the arrows.

mar

a vector with 4 elements, defining the margins for the plot

cex.per

the character extension for the period labels

cex.tck

character extension for the ticklabels, tipically years

cex.cash

the character extension for the labels of the cashflows

See Also

NPV

Examples

Run this code
# NOT RUN {
PlotCashFlow(x=c(6:9, 13:15), y=-c(rep(40, 4), rep(50,3)),
             xlim=c(6,17), labels=c(rep(40, 4), rep(50,3)))

PlotCashFlow(x=c(6,8,9,12,17), y=c(10,30,40,50,70))
# }

Run the code above in your browser using DataLab