Use with DBI::dbConnect() to open a connection to an xarray object in
a live Python session managed by reticulate (see
dbConnect()).
Usage
xarray()
# S4 method for class 'XarrayDriver'
show(object)
# S4 method for class 'XarrayDriver'
dbUnloadDriver(drv, ...)
# S4 method for class 'XarrayDriver'
dbDataType(dbObj, obj, ...)Arguments
- object, drv, dbObj
an XarrayDriver
- ...
unused
- obj
an R object, for
dbDataType()
Value
xarray(): an XarrayDriver. dbDataType(): character, the
numpy dtype an R vector maps to. dbUnloadDriver(): TRUE,
invisibly. show(): called for its output.
See also
dbConnect() to open a connection; xrdbi-package for an overview.
Examples
drv <- xarray()
drv
#> <XarrayDriver>
dbDataType(drv, Sys.Date())
#> [1] "datetime64[D]"
if (FALSE) { # \dontrun{
## needs a Python environment with xarray (see ?xrdbi)
f <- system.file("extdata/autotest/trmm.nc", package = "xrdbi")
con <- dbConnect(drv, f)
## open_zarr defaults to dask; chunks = None keeps the fast lazy path
reticulate::py_require("zarr")
con <- dbConnect(drv, "path/or/url.zarr", open = "open_zarr",
chunks = reticulate::py_none())
} # }