[R] getDividents() doesn't work
Joshua Ulrich
jo@h@m@u|r|ch @end|ng |rom gm@||@com
Tue Sep 20 18:51:35 CEST 2022
You need to assign the result to an object.
vox_div <- quantmod::getDividends("VOX")
You should check to see if the dividends are split-adjusted or not.
Yahoo has changed that several times over the years. Use the
`split.adjust` argument to get the (un)adjusted dividends. The boolean
may be backward because of Yahoo's changes.
Best,
Josh
On Tue, Sep 20, 2022 at 11:48 AM Phil Smith via R-help
<r-help using r-project.org> wrote:
>
> Hi R-Help People!
>
> I'm using the current version of R for Ubuntu: R version 4.2.1 (2022-06-23) -- "Funny-Looking Kid."
>
> I'm using the quantmod package and am having difficulty with the getDividends() function from the quantmod package.
>
> Here is my code:
>
> > library(quantmod)
>
> >
> > getDividends( "VOX" )
>
> Here is the output:
> Warning message:
> In read.table(file = file, header = header, sep = sep, quote = quote, :
> incomplete final line found by readTableHeader on 'https://query1.finance.yahoo.com/v7/finance/download/VOX?period1=-2208988800&period2=1663545600&interval=1d&events=split'>
>
> There was not an object in my work space like "VOC.div" or anything like that, so I'm pretty sure getDividends failed completely....
>
> .... except for the slight possiblity that I did something wrong!
>
> Can somebody please tell me how to get getDividends to work?
>
> Thank you!
> Daryl
> Daryl's Rural Roadside Honor System Vegetable and Flower Stand and Occasional Dairy Produce
> Rural area, USA
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help using 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.
--
Joshua Ulrich | about.me/joshuaulrich
FOSS Trading | www.fosstrading.com
More information about the R-help
mailing list