if (check_suggests(example = TRUE)) {
  raster <- terra::rast(ncol = 8, nrow = 8)
  raster[] <- sapply(1:terra::ncell(raster), function(x){
     rnorm(1, ifelse(x %% 8 != 0, x %% 8, 8), 3)})
  scatterplot <- plot_scatter(raster, sample = 10, axis = "Longitude", name = "Example")
  scatterplot()
} else {
  message('reinstall with install.packages("shinyscholar", dependencies = TRUE)
  to run this example')
}
Run the code above in your browser using DataLab