f <- "S20080012008031.L3m_MO_CHL_chlor_a_9km.nc"
l3file <- system.file("extdata/oceandata", f, package= "tidync")
## extract a raw list by filtered dimension
library(dplyr)
araw1 <- tidync(l3file) %>%
hyper_filter(lat = between(lat, -78, -75.8),
lon = between(lon, 165, 171)) %>%
hyper_array()
araw <- tidync(l3file) %>%
hyper_filter(lat = abs(lat) < 10,
lon = index < 100) %>%
hyper_array()
## hyper_array will pass the expressions to hyper_filter
braw <- tidync(l3file) %>%
hyper_array(lat = abs(lat) < 10, lon = index < 100)
## get the transforms tables (the axis coordinates)
lapply(attr(braw, "transforms"),
function(x) nrow(dplyr::filter(x, selected)))
## the selected axis coordinates should match in order and in size
lapply(braw, dim)
Run the code above in your browser using DataLab