On Fri, 23 Jun 2006 16:12:27 -0500 Kerpel, John wrote:

> > SP500<-read.zoo("SP500.csv", sep = ",")
> Error in read.zoo("SP500.csv", sep = ",") : 
>         index contains NAs

Well, there are two problems with this: 1. the CSV is not
comma-separated (despite its siffix) and 2. the date format should be
specified.

> First ten records of SP500.csv:
> 
> Date          Open    High    Low     Close
> Volume        Adj. Close*
                ^^^^^^^^^^^
and I changed this name to "Adj.Close" which gives a syntactically
valid name in R.

Then I successfully employed:
  SP500 <- read.zoo("SP500.csv", format = "%d-%b-%y", header = TRUE)
  DGS10 <- read.zoo("DGS10.csv", format = "%m/%d/%Y", header = TRUE)
and then
  weekdays(time(SP500))
  weekdays(time(DGS10))

Z

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to