Learn R Programming

ncdf4.helpers (version 0.3-7)

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

Description

Infer dimension axes from names of dimensions.

Usage

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

Value

A named character vector mapping dimension names to axes.

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.

Examples

Run this code
## Get dimension axes from file by inferring them from dimension names
if (FALSE) {
f <- nc_open("pr.nc")
dim.axes <- nc.get.dim.axes.from.names(f, "pr")
nc_close(f)
}

Run the code above in your browser using DataLab