nc.get.variable.list: Get a list of names of data variables

Description Usage Arguments Details Value Examples

View source: R/helpers.r

Description

Get a list of names of data variables.

Usage

1
nc.get.variable.list(f, min.dims = 1)

Arguments

f

The file (an object of class ncdf4)

min.dims

The minimum number of dimensions a variable must have to be included.

Details

This function returns the names of any data variables found in the file – that is, variables which are NOT dimension variables, dimension bounds variables, climatology bounds variables, coordinate variables, or grid mapping variables.

Optionally, one may require that the variables have a minimum number of dimensions; this can eliminate unwanted variables left in files.

Value

A character vector naming all of the data variables found.

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")
var.list <- nc.get.variable.list(f)
nc_close(f)

## End(Not run)

ncdf4.helpers documentation built on May 29, 2017, 9:36 p.m.