I'm trying to create a variogram using packages gstat and sp.
the script goes as follow :
reszn <- read_excel("C:/....../residuszn.xlsx")
the class(reszn) gives me this output :
so it does not seem to have any issue at this point
but when it comes to
I have this error popping out
Error in model.frame.default(terms(formula), as(data, "data.frame"), na.action = na.fail) :
the object isn't a matrix
I tried to convert my spatialized dataframe as a matrix using
mreszn<-data.matrix(reszn,rownames.force = FALSE)
and I have this error :
Error in as.vector(data) :
No method to automaticaly convert this S4 class into vector.
So I don't know what to do anymore... Any help would be very welcome
PS : error messages have been translated from french
PPS: I don't have any NA in my data frame.