Hello:

I note a conflict in the documentation for Intamap/interpolate(), need to know how to resolve:

I have two SpatalPointsDataFrame objects:

growingDegreeObservations <- readShapePoints("OhioGDDStationsGP.shp") # computed surface phenomena, for individual lat/lon points OrgStaLocs <- readShapePoints("Org_Locations.shp") # species observation stations, for DIFFERENT lat/lon points

# Objective: Interpolate the growingDegree points into a SpatialGrid (?) raster field, and then # overlay the observation stations on to the field, and assign field values to each observation station points

# according to intamap documentation, the interpolate() method accepts two SptatialPointsDataFrame objects, interpolates # the first ($value field) into a grid, and assigns interpolated observations to the predicted locations (monarchStaLocs).

interpImage <- interpolate(growingDegreeObservations ,OrgStaLocs,list(mean=TRUE, variance=TRUE))

However, when this line is executed, the error occurs:

Error in function (classes, fdef, mtable)  :
unable to find an inherited method for function "interpolate", for signature "SpatialPointsDataFrame"

I guess that this refers to the first argument, and that the argument must be a SpatialPixels or SpatialGrid data frame.
Questions:

1) Do I understand the inputs and outputs of interpolate() correctly?

2) How best to transform the incorrect (SpatialPointsDataFrame) argument
to match the required inputs? E.G., create the interpolated SpatialPixelsDataFrame
     of observations before calling interpolate())

3) Is there a better R technique (e.g., direct call to krige()) for computing my solution?

Thanks, Rick R

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to