Hi all.  I'm suddenly having problems with the following:
> FUT10Y<-read.table("C:\\FUT10YR.csv",header=TRUE,sep=",")
> head(FUT10Y)
       Date  PX_OPEN  PX_HIGH   PX_LOW  PX_LAST
1  1/5/1999 119.0000 119.1875 118.5312 118.6250
2  1/6/1999 118.5938 118.8750 118.2812 118.8438
3  1/7/1999 118.9062 119.0312 118.3750 118.5000
4  1/8/1999 118.4688 118.5625 117.5312 117.8125
5 1/11/1999 117.6562 117.7812 117.1250 117.5625
6 1/12/1999 117.5312 118.2188 117.2500 117.9688
> FUT10Y<-as.timeSeries(FUT10Y)
Error in midnightStandard2(charvec, format) :
  'charvec' has non-NA entries of different number of characters

I thought timeSeries auto-detected the dates and formatted appropriately.
 Should I set the format explicitly?  I've checked the raw data file and
didn't find an errant characters, although there are some NAs in the non
date column.

Thanks,

John

R version 2.9.2 (2009-08-24)
i386-pc-mingw32

locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
States.1252;LC_MONETARY=English_United
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

attached base packages:
[1] splines   stats     graphics  grDevices utils     datasets  methods
base

other attached packages:
 [1] PerformanceAnalytics_0.9.7.1 doBy_4.0.4
survival_2.35-7              fImport_2100.77
 [5] gogarch_0.6-9                fastICA_1.1-11
fGarch_2100.79               fBasics_2100.78
 [9] timeSeries_2100.84           timeDate_2100.86             vars_1.4-6
                urca_1.2-3
[13] strucchange_1.3-7            sandwich_2.2-1               zoo_1.5-8
               MASS_7.2-49

loaded via a namespace (and not attached):
[1] cluster_1.12.1     grid_2.9.2         Hmisc_3.7-0        lattice_0.17-26
   Matrix_0.999375-31 nlme_3.1-96
[7] tools_2.9.2

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to