Learn R Programming

PerformanceAnalytics (version 0.9.5)

chart.Bar: wrapper for barchart of returns

Description

A wrapper to create a chart of periodic returns in a bar chart. This is a difficult enough graph to read that it doesn't get much use. Still, it is useful for viewing a single set of data.

Usage

chart.Bar(R, legend.loc = NULL, colorset = (1:12), ...)

Arguments

R
a vector, matrix, data frame, timeSeries or zoo object of asset returns
legend.loc
places a legend into one of nine locations on the chart: bottomright, bottom, bottomleft, left, topleft, top, topright, right, or center
colorset
color palette to use, set by default to rational choices
...
any other passthru parameters, see plot

Value

  • Creates a plot of time on the x-axis and vertical lines for each period to indicate value on the y-axis.

Details

This is really a wrapper for chart.TimeSeries, so several other attributes can also be passed.

See Also

chart.TimeSeries plot

Examples

Run this code
data(edhec)
chart.Bar(edhec[,"Funds.of.Funds"], main="Monthly Returns")

Run the code above in your browser using DataLab