An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20091126/82fd30a0/attachment.pl>
Error with KED with 2 external drift factors, one iterating in time
2 messages · Tobin Cara, Edzer Pebesma
Tobin Cara wrote:
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)
use list_ked[[i]] <- krige(Temp00[,i]~Z+COS7, DataCoordhr, elev, fitted_vario) and make sure that DataCoordhr is of class SpatialPointsDataFrame, e.g. by doing a coordinates(DataCoordhr) <- ~x+y or sth like that.
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]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Edzer Pebesma Institute for Geoinformatics (ifgi), University of M?nster Weseler Stra?e 253, 48151 M?nster, Germany. Phone: +49 251 8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de/ http://www.springer.com/978-0-387-78170-9 e.pebesma at wwu.de