Hi
I got the following error using as.xts
Error in xts(x, order.by = order.by, frequency = frequency, ...) :
  NROW(x) must match length(order.by)
Here is how the data looks like
> d1 <- read.csv(file.path(dataDir,"AppendixA-FishCountsTable-2009.csv"),
as.is=T)
> d1[1:3,]
  dive_id       date  time      species count size    site depth level
TRANSECT VIS_M
1      62 10/12/2009 12:44 E. lateralis     2   15 Hopkins    15     B
   1     4
2      62 10/12/2009 12:44 E. lateralis     1   22 Hopkins    15     B
   1     4
3      62 10/12/2009 12:44 E. lateralis     1   25 Hopkins    15     B
   1     4
> diveData_2009 <- as.xts( d1,order.by=as.POSIXct(strptime(paste(d$date,
d$TIME ), "%d/%m/%Y %H:%M") ))
Error in xts(x, order.by = order.by, frequency = frequency, ...) :
  NROW(x) must match length(order.by)

I could not figure out how to correct it
Thank you for your help
Yolande

        [[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