Alternatively, xts has a convenience function for this
.indexwday(SPY)
will give weekdays as numbers with Sunday being 0 and Saturday being 6.
There are also several similar functions
.indexDate(x)
.indexday(x)
.indexmday(x)
.indexwday(x)
.indexweek(x)
.indexmon(
On Wed, Aug 1, 2012 at 12:54 PM, Douglas Karabasz
wrote:
> I used quantmod to pull in price data from the ticker SPY. The data has
> date and closing price. I would like to show the day of the week for each
> closing price. Is that possible? Also, I would like to add the back into
> the data f
I used quantmod to pull in price data from the ticker SPY. The data has
date and closing price. I would like to show the day of the week for each
closing price. Is that possible? Also, I would like to add the back into
the data frame in a new column without changing the structure of the data
se
3 matches
Mail list logo