Skip to content
Prev 14089 / 15274 Next

Properly making a xts object from csv file

Hi Colton,
On Tue, Nov 15, 2016 at 12:50 PM, Colton Smith <coltonsmith321 at gmail.com> wrote:
Pictures of data aren't particularly helpful.  Someone would have to
hand-enter those values to be able to do anything meaningful with the
data.
Pictures of code are even less helpful than pictures of data.  No one
can copy/paste your picture into their R console to try and replicate
your results. ;)
Nothing in FinancialInstrument depends on dplyr, so there's no way
that *not* having dplyr attached could cause an issue with stock().
The problem is that you're passing an xts object as the 'primary_id',
when the documentation says:

primary_id: String describing the unique ID for the instrument. Most of
          the wrappers allow this to be a vector.

dplyr shouldn't cause issues with most package code, because most
packages should now protect themselves from the sort of badness in
dplyr (I'm looking at you, dplyr::lag).  But it will cause issues for
you at the top-level, because calling lag() on an xts object won't do
what you'd expect.