search for: data_it_mt

Displaying 1 result from an estimated 1 matches for "data_it_mt".

2023 Feb 21
1
Interpolación IDW
...ender mejor todo, pero me sale el siguiente error: *Error in as.data.frame.default(x[[i]], optional = TRUE) : cannot coerce class ?structure("RasterLayer", package = "raster")? to a data.frame* El código es el siguiente: *for (i in 1:nrows_mt) { data_it_mt <- as.numeric(as.vector(data_y_mt[i,])) it_data_mt <- idw(data_it_mt, sta_mt, grid, p = 1) grid <- data.frame(grid, valores = it_data_mt[ , 1]) coordinates(grid) <- ~x+y gridded(grid) <- T grid <- raster(grid, "valores") projection(grid) <- crs(&quot...