View source: R/hyper_tbl_cube.R
hyper_tbl_cube | R Documentation |
Produce a tbl_cube from NetCDF. This is a delay-breaking function and causes data to be read from the source into the tbl cube format defined in the dplyr package.
hyper_tbl_cube(x, ..., force = FALSE) ## S3 method for class 'tidync' hyper_tbl_cube(x, ..., force = FALSE) ## S3 method for class 'character' hyper_tbl_cube(x, ..., force = FALSE)
x |
tidync object |
... |
arguments for |
force |
ignore caveats about large extraction and just do it |
The size of an extraction is checked and if quite large there is an a user-controlled
prompt to proceed or cancel. This can be disabled with options(tidync.large.data.check = FALSE)
please see hyper_array()
for more details.
The tbl cube is a very general and arbitrarily-sized array that can be used with tidyverse functionality. Dimension coordinates are stored with the tbl cube, derived from the grid transforms.
tbl_cube
dplyr::tbl_cube
hyper_array()
and hyper_tibble()
which are also delay-breaking
functions that cause data to be read
f <- "S20080012008031.L3m_MO_CHL_chlor_a_9km.nc" l3file <- system.file("extdata/oceandata", f, package= "tidync") (cube <- hyper_tbl_cube(tidync(l3file) %>% activate(chlor_a), lon = lon > 107, lat = abs(lat) < 30)) ufile <- system.file("extdata", "unidata", "test_hgroups.nc", package = "tidync", mustWork = TRUE) ## some versions of NetCDF don't support this file ## (4.1.3 tidync/issues/82) group_nc <- try(tidync(ufile), silent = TRUE) if (!inherits(group_nc, "try-error")) { res <- hyper_tbl_cube(tidync(ufile)) print(res) } else { ## the error was writeLines(c(group_nc)) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.