st_res | R Documentation |
obtain resolution(s) of a stars object: by default only the (absolute) x/y raster dimensions, optionally all delta
dimension parameters
st_res(x, all = FALSE, absolute = !all)
x |
an object of class |
all |
logical; if FALSE return a vector with the x/y raster resolution |
absolute |
logical; only works when |
if all = FALSE
a vector with x/y raster resolutions, otherwise a list with delta values
st_res(L7_ETMs)
st_res(L7_ETMs, absolute = FALSE)
st_res(L7_ETMs, all = TRUE)
if (require(starsdata)) {
paste0("netcdf/", c("avhrr-only-v2.19810901.nc",
"avhrr-only-v2.19810902.nc",
"avhrr-only-v2.19810903.nc",
"avhrr-only-v2.19810904.nc")) |>
system.file(package = "starsdata") |>
read_stars(quiet = TRUE) -> x
st_res(x) |> print()
st_res(x, all = TRUE) |> print()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.