[R-SIG-Finance] contribution: chart_Series with vertical/horizontal lines

Gordon Erlebacher gordon.erlebach at gmail.com
Thu May 31 19:25:09 CEST 2012


My programming approach seems much simpler than what I have seen. I do
not use substitute, grep, parse etc., commands,
that I pretty much don't understand. I attach the source code.

The following draws two horizontal lines and two vertical lines.
Inside the function I create two additional functions:

  horizontal.lines = function(y.coords, xmin, xmax, col='red')
  vertical.lines = function(x.coords, ymin, ymax, col='red')

Enjoy!  Feedback is appreciated.


    myChart_Series(BAS,x.coords=c(1000,1200),y.coords=c(28.,29.))


     gordon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: myChart_Series.r
Type: application/octet-stream
Size: 9391 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-finance/attachments/20120531/b86c668a/attachment.obj>


More information about the R-SIG-Finance mailing list