r-spatial / gstat

Spatial and spatio-temporal geostatistical modelling, prediction and simulation
http://r-spatial.github.io/gstat/
GNU General Public License v2.0
195 stars 49 forks source link

issue in variogram fuction #74

Open zainabnajeh opened 4 years ago

zainabnajeh commented 4 years ago

Hell, I am trying to construct and plot the variogram for a mobile data (an obs. every second), I am getting this error and I don't know where is issue.

STIDF_google_32 <- stConstruct(extract_jan_g_32,space=c('Longitude','Latitude'),time='Date_Time_CA',SpatialObj=SpatialPoints(extract_jan_g_32[,c('Longitude','Latitude')])) STIDF_google_3 <- as(STIDF_google_32, "STIDF") vvst <- variogram(PM_fun~1, STIDF_google_32[!is.na(STIDF_google_32[,"2017-01-03::2017-01-05","PM_fun"]$PM_fun),"2017-01-03::2017-01-05","PM_fun"],tunit = "secs", width=25,cutoff=400,tlags=0:5) The error is Error in [<-(*tmp*, i, 1:min(nData, twindow), value = cumsum(diffTime[i + : subscript out of bounds

Thanks in advanced. Regards Zeinab