diff --git a/R/raster-info.R b/R/raster-info.R index 96c0381..fc89efe 100644 --- a/R/raster-info.R +++ b/R/raster-info.R @@ -296,8 +296,8 @@ vapour_sds_names <- function(x) { #' @examples #' drivers <- vapour_all_drivers() #' ok <- drivers$raster[ drivers$driver == "netCDF"] -#' if (isTRUE(ok)) { -#' ##vapour_geolocation(system.file("extdata/gdal/geos_rad.nc", package = "vapour"), 0L) +#' if (isTRUE(ok) && interactive()) { +#' vapour_geolocation(system.file("extdata/gdal/geos_rad.nc", package = "vapour"), 0L) #' } vapour_geolocation <- function(x, sds = NULL) { sd <- if (is.null(sds)) 0L else as.integer(sds[1L]) diff --git a/man/vapour_geolocation.Rd b/man/vapour_geolocation.Rd index 59444b8..c2a881a 100644 --- a/man/vapour_geolocation.Rd +++ b/man/vapour_geolocation.Rd @@ -23,7 +23,7 @@ If no geolocation exist the return value is an empty list. \examples{ drivers <- vapour_all_drivers() ok <- drivers$raster[ drivers$driver == "netCDF"] -if (isTRUE(ok)) { +if (isTRUE(ok) && interactive()) { vapour_geolocation(system.file("extdata/gdal/geos_rad.nc", package = "vapour"), 0L) } }