nc.get.dim.axes.from.names: Infer dimension axes from names of dimensions

Description Usage Arguments Details Value Examples

View source: R/helpers.r

Description

Infer dimension axes from names of dimensions.

Usage

1
nc.get.dim.axes.from.names(f, v, dim.names)

Arguments

f

The file (an object of class ncdf4)

v

The name of a variable

dim.names

Optionally, dimension names (to avoid looking them up repeatedly)

Details

This function makes educated guesses as to what axes dimensions may apply to in the case of files with poor metadata.

Value

A named character vector mapping dimension names to axes.

Examples

1
2
3
4
5
6
7
## Get dimension axes from file by inferring them from dimension names
## Not run: 
f <- nc_open("pr.nc")
dim.axes <- nc.get.dim.axes.from.names(f, "pr")
nc_close(f)

## End(Not run)

ncdf4.helpers documentation built on Oct. 15, 2021, 5:19 p.m.