Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

variogram runtime error after upgrade to v2.0-5 #65

Closed
sambo1972 opened this issue Apr 18, 2020 · 2 comments
Closed

variogram runtime error after upgrade to v2.0-5 #65

sambo1972 opened this issue Apr 18, 2020 · 2 comments

Comments

@sambo1972
Copy link

Hi,

The error below is thrown at runtime when attempting to generate a variogram on an STFDF data frame.

This only occurred after updated my R packages - which were pretty old but this code did work previously. The specific example is code taken from "Spatio-Temporal Statistics with R" which has a companion package "STRbook" (https://github.com/andrewzm/STRbook)

To reproduce first install package STRbook (just to get this spatial object) and then execute:

# obs from July 1993 only
data("STObj3", package="STRbook")
STObj4 <- STObj3[, "1993-07-01::1993-07-31"]

# note gstat::variogram actually calculates sample semivariogram
vv <- variogram(object = z ~ 1 + lat, # fixed effect component
+                 data = STObj4,
+                 width = 80,           # spatial bin of 80 km
+                 cutoff = 1000,        # only consider points < 1000km apart
+                 tlags = 0.01:6.01     # 0 days to 6 days
+                 )
  |                                             |   0%

Error in variogramST(formula = object, locations = locations, data = data,  : object 'ret' not found
@sambo1972
Copy link
Author

@edzer this issue has been duplicated here:: #66

I can confirm that the variogram function successfully runs on a spatial data frame in versions 2.0-0, 2.0-2 and 2.0-4.

The fail condition above was introduced in 2.0-5.

@edzer
Copy link
Member

edzer commented Apr 26, 2020

Thanks, I can reproduce that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants