2. Start R and install quantmod package in R prompt.
>install.packages(c('xts','Defaults','quantmod'))
3. Get IBM stock quote using Yahoo web site.
>library("quantmod") or require(quantmod)
>getSymbols("IBM") or
>getSymbols("IBM",src="Yahoo")
4. Chart the IBM using any of the following command:
>plot(IBM)
>chartSeries(IBM)
5) To change to white scheme and only current year chart, use the following:
chartSeries(IBM,theme='white',subset='2013-01::2013-07')
reChart(major.ticks='months',subset='first 16 weeks')
7) To show the content of IBM, just type IBM in the prompt
No comments:
Post a Comment