Hi,

I am having troubles importing data from an scv file in R.

This is my current code:


returns <- read.zoo("empty143.csv", format = "%d/%b/%Y", sep = ",", header
= TRUE, skip=1 )


for importing data of this type:

Request4*,
,fx.TWD.USD.SPOT.soho
01/Jan/1988,0.03502627
04/Jan/1988,0.03502627
05/Jan/1988,0.03502627
06/Jan/1988,0.035038542

the error is:
Error in read.zoo("empty143.csv", format = "%d/%b/%Y", sep = ",", header =
TRUE,  :
        index contains NAs

I guess my syntax is just wrong

The next code lines would be:
returns <- mreturns <- window(returns, start = as.Date("01/Jan/1988"))
returns <- window(returns, end = as.Date("08/Jun/1988"))
retdat <- as.data.frame(returns)
attach(retdat)
retdat

Any help would be more than greatly appreciated.

Cheers,
NIco



This message and any attachments (the "message") is\ intende...{{dropped}}

______________________________________________
R-help@stat.math.ethz.ch 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