source("spacetime.R", echo=T)
q()
source("spacetime.R", echo=T)
source("spacetime.R")
all.equal(stfdf, xx)
summary(stfdf)
summary(xx)
is.list(xx@sp)
library(rgdal)
system("ogr2ogr output_file.shp PG:\"dbname=gadmgd user=xuser password=readonly host=geoserv.eu\" countries")
system("ogr2ogr output_file.shp PG:\"dbname=gadmgd user=xuser password=readonly host=geoserv.eu\" countries")
system("ogr2ogr output_file.shp PG:\"dbname=gadmgd user=xuser password=readonly host=geoserv.eu\" countries")
system("ogr2ogr output_file.shp PG:\"dbname=gadmgd user=xuser password=readonly host=geoserv.eu\" countries")
lapply(mydata, class)
lapply(stfdf@data, class)
stfdf = STFDF(sp, time, mydata)
mydata
mydata = rnorm(length(sp)*length(time),mean=rep(m, 4))
IDs = paste("ID",1:length(mydata), sep = "_")
mydata = data.frame(values = signif(mydata,3), ID=IDs)
stfdf = STFDF(sp, time, mydata)
library(spacetime)
showClass("ST")
showClass("STFDF")
sp = cbind(x = c(0,0,1), y = c(0,1,1))
row.names(sp) = paste("point", 1:nrow(sp), sep="")
sp = SpatialPoints(sp)
time = xts(1:4, as.POSIXct("2010-08-05")+3600*(10:13))
m = c(10,20,30) # means for each of the 3 point locations
mydata = rnorm(length(sp)*length(time),mean=rep(m, 4))
IDs = paste("ID",1:length(mydata), sep = "_")
mydata = data.frame(values = signif(mydata,3), ID=IDs)
stfdf = STFDF(sp, time, mydata)
lapply(stfdf@data, class)
x = as(stfdf, "STSDF")
all.equal(as(x, "STFDF"), stfdf)
?data.frame
