Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- model <- as.formula(Value ~ Elevation)
- data <- matrix(c(11.07,42.75,5,62.5,
- 8.73,45.62,234,75,
- 12.62,44.03,12,75,
- 10.87,45.38,67,75,
- 8.79,42.53,64,75),
- nrow = 5, byrow = TRUE)
- data <- as.data.frame(data)
- names(data) <- c('Lon', 'Lat', 'Elevation', 'Value')
- library('sp')
- coordinates(data) = ~Lon+Lat
- library('automap')
- autofitVariogram(model, data)
- library(gstat)
- library(sp)
- data <- matrix(c(11.07,42.75,5,62.5,
- 8.73,45.62,234,75,
- 12.62,44.03,12,75,
- 10.87,45.38,67,75,
- 8.79,42.53,64,75),
- nrow = 5, byrow = TRUE)
- data <- as.data.frame(data)
- names(data) <- c('Lon', 'Lat', 'Elevation', 'Value')
- coordinates(data) = ~Lon+Lat
- variogram(Value ~ Elevation, data)
- ## NULL
Add Comment
Please, Sign In to add comment