[R-sig-Geo] error in STSDF class

Saman Monfared samanmonfared1 at gmail.com
Fri Apr 5 14:33:38 CEST 2013


HI,
I am trying to construct a STSDF class for st data for 17 locations
and 376 times.
what is mean of (Error: order(time, t) == t is not all TRUE)
my code is:

data<-read.table("stfars.cancer.txt",header=TRUE)
cancer.loc<-read.table("cancer.loc.txt",header=TRUE)
stations<-cancer.loc[c(-1,-3,-5,-8,-16,-19,-22),]
sp<-cbind(stations$x,stations$y)
row.names(sp) = paste("point", 1:nrow(sp), sep="")
library(sp)
sp = SpatialPoints(sp)
time = ISOdate(data$year,data$mounth,data$day)
values =rnorm(length(sp)*length(time))
IDs = paste("ID",1:length(values), sep = "_")
mydata = data.frame(values = signif(values, 3), ID=IDs)
library(spacetime)
stfdf = STSDF(sp,time, data = mydata)


order(time, t) == t is not all TRUE

Thanks.--
Saman Monfared
Msc, Department of Statistics, Shiraz University,
Shiraz 71454, Iran
Email: Samanmonfared1 at gmail.com

Tel: +98 917 5305167



More information about the R-sig-Geo mailing list