[R] Time Series Format Error

Steve_Friedman at nps.gov Steve_Friedman at nps.gov
Thu Sep 24 19:45:18 CEST 2009


I have rec'd the following error:

P34annual <-
read.table("A:\\Data\\Output\\Sparrow\\Hydro_Data\\P34_Annual.txt",
header=TRUE, sep=",", stringsAsFactors= FALSE, skip=1)
   P34annual$GS <- rep(1.86, dim(P34annual)[1])
    P34annual$Depth <- as.numeric(P34annual$P34_stage) -
as.numeric(P34annual$GS)

    P34annual.ts <- as.ts(data=P34annual$Depth, frequency = ( 1),
start=c(1981), end=c(2009))

Error in inherits(x, "ts") : element 1 is empty;
   the part of the args list of '.Internal' being evaluated was:
   (x, what, which)

If anyone can let me know where I've messed up I'd appreciate it greatly.

Thanks

Steve Friedman Ph. D.
Spatial Statistical Analyst
Everglades and Dry Tortugas National Park
950 N Krome Ave (3rd Floor)
Homestead, Florida 33034

Steve_Friedman at nps.gov
Office (305) 224 - 4282
Fax     (305) 224 - 4147




More information about the R-help mailing list