loc_index | R Documentation |
This is useful to convert real dimensional values to array indices for making data requests. The index assigned is always the dimensional step closest.
loc_index(x, value, what = "lon", make_rle = FALSE)
x |
ncdf4 object |
value |
vector of one of values (numeric for lon, lat, lev and POSIXct for time) |
what |
character, the name of the dimension |
make_rle |
logical, if TRUE use the first and last elements of value (which
may also be the first) to construct |
numeric vector if either indices closest to requested locations or
two element [start, length]
vector if rle = TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.