Hot answers tagged

1 vote

Values of ordinary kriging with gstat and terra are equal as the input data

Kriging is an exact interpolator, meaning its predicted values pass through the original data at the data point locations. If you feed it a regular grid of values then predict on that grid, you'll get ...
Spacedman's user avatar
  • 63.2k
1 vote

Sampling 10% of cells in terra raster in R

Do you really want a random sample that includes everything (terrestrial and ocean)? If so, then just sample a vector that is 1:n, these values would then relate to the cell numbers and can be indexed....
Jeffrey Evans's user avatar
1 vote

R: Error Data is too long

As Jeffrey Evens pointed out, you can do terra::global(ras_smooth, "sd", na.rm=TRUE) If you want to use a sample you can do something like this sd(spatSample(ras_smooth, 10000)[,1])
Robert Hijmans's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible