Skip to content
Prev 6700 / 15274 Next

basic "date" issue

Faith,

as.xts.data.frame assumes the rownames of the data.frame contain the
dates/times.  So you need to either:

1) Set the rownames before running as.xts:
rownames(Dataset) <- as.Date(Dataset[,1],"%d.%m.%Y")
as.xts(Dataset)

2) or, use the xts constructor:
xts(Dataset[,-1],as.Date(Dataset[,1],"%d.%m.%Y"))

HTH,
--
Joshua Ulrich
FOSS Trading: www.fosstrading.com
On Fri, Sep 24, 2010 at 8:20 AM, Pam <fkiraz11 at yahoo.com> wrote: