Skip to contents

Data structures

Variable()
Variable: a named-dimension array
DataArray()
DataArray: a Variable with coordinates
Dataset()
Dataset: a collection of aligned Variables on shared dimensions
as_variable()
Quick Variable constructor from a named-dim array

Coordinates and indexes

Index() index_dims() index_sizes() index_coords() index_sel() index_isel() index_drop() index_equals()
Indexes: the contract between labels and positions
coordinates
Coordinate classes
ImplicitCoord()
Create an implicit (regular-grid) coordinate
ExplicitCoord()
Create an explicit (irregular) coordinate
coord_dim()
Get the dimension name of a coordinate
coord_length()
Get the length of a coordinate
coord_lookup()
Look up integer index for a coordinate value
coord_slice()
Slice a coordinate by integer indices
coord_values()
Get the values of a coordinate
AffineIndex()
Affine (geotransform) index
as_geotransform()
Get the GDAL geotransform of an AffineIndex
set_affine_index()
Combine two regular coordinates into an AffineIndex

Selection

isel() sel()
Coordinate-based indexing
ds_dims()
List dimension names and sizes across a Dataset

Arithmetic and broadcasting

ops
Arithmetic operations on Variables and DataArrays
broadcasting
Dimension-aware broadcasting

Reductions

nd_mean() nd_sum() nd_min() nd_max()
Reductions along named dimensions

Reading data

open_dataset()
Open a dataset from a file or URL
open_raster()
Open a raster band as a lazy DataArray
cf_decode_time()
Decode CF time values to R Date or POSIXct
lazy-data
Lazy data in a Variable
collect()
Read lazy data into memory

Methods

ndim() shape()
Number of dimensions and shape of a Variable
print-methods
Print methods for ndr objects
as.data.frame(<ndr::DataArray>)
Coerce to data frame (long format)
as.list(<ndr::Dataset>)
Convert a Dataset to a list of data frames
`$`(<ndr::Dataset>)
Extract a DataArray from a Dataset
names(<ndr::Dataset>)
Variable names in a Dataset