Reading ?getSymbols, why do think you can get yearly data if the src -- "yahoo" by default -- only contains daily data? And if you can get the daily data, why can't you just pick a day from each year to make it yearly?
Note: I'm not a quantmod user, so apologies if I just don't get it. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Fri, Sep 1, 2017 at 4:37 PM, Yingrui Liu <yliu...@jhu.edu> wrote: > Dear Sir/Madam, > > > How to use getSymbols() to get annual data? For example, I need the annual > stock price of APPLE from the year 2000 to 2016. How to write the command? > I only know how to get the daily data. It is: > > > getSymbols("AAPL",from="2000-01-01",to="2016-12-31") > > > Thank you very much. > > > Have a good week! > > > Best regards, > > > Yingrui Liu > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/ > posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.