[R] Import .scv data query
nicolas.guibert at asia.bnpparibas.com
nicolas.guibert at asia.bnpparibas.com
Thu Apr 6 11:01:33 CEST 2006
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}}
More information about the R-help
mailing list