jamesotto852 / ggspatreg

An R package for visualizing spatial regression methods with ggplot2
Other
5 stars 0 forks source link

Suppress gstat message about type of kriging being used #1

Open jamesotto852 opened 2 years ago

jamesotto852 commented 2 years ago

When gstat::krige() is called in ggspatstat:::krigedf(), it produces a message about the type of kriging being used. This is unnecessary and should be suppressed.

library("tidyverse")
library("ggspatreg")

set.seed(1)

df <- expand_grid(x = 0:100, y = 0:100) |>
  slice_sample(n = 600) |>
  mutate(z = geoR::grf(grid = bind_cols(x, y), cov.model = "exp", cov.pars = c(5, 30), nugget = 1)$data)

ggplot(df, aes(x, y, z = z)) +
  geom_krige()

#> [using ordinary kriging]

Created on 2022-02-17 by the reprex package (v2.0.1)