Hello,

I am trying to krige temperature relative to an elevation and a forecast grid. The forecast changes hourly.

Everything reads in well until I use the kriging command:

list_ked[[i]] <- krige(Temp00[,i]~Z+COS7, locations=DataCoordhr, newdata=elev, model = fitted_vario)

Error in function (classes, fdef, mtable)  :
  unable to find an inherited method for function "krige", for signature "formula", "data.frame"
> trace()
Error in methods::.TraceWithMethods(where = <environment>) :
  element 1 is empty;
   the part of the args list of 'is.function' being evaluated was:
   (what)



I have linked my data coordinates with both Z and COS7 and I have linked two ascii grids elev and COS7 with the following commands:



COS700 <- read.table("D:\\Krigging R\\COSMO7Temp2000\\COS7_Val_Temp_00_trans.txt")
COS7hr <- COS700[,i]

DataCoord <- read.delim("TempANZCoord_Elev_Val00.txt")
DataCoord <- as.matrix(DataCoord)  ## transform into a matrix
DataCoordhr <- cbind(DataCoord,COS7hr) ## append a new column at the end
DataCoordhr <- as.data.frame(DataCoordhr) ## backtransform into data frame
names(DataCoordhr) <- c("X","Y","Z","COS7hr") ## define new names



#Merge COS7 and elevation into elev
elev$COS7 = COS7[[1]] #make them into a single object, replace as newdata



Does anyone have any ideas?



Thank you in advance,

Cara


	[[alternative HTML version deleted]]

