renameLayers: Rename layers

View source: R/renameLayers.R

renameLayersR Documentation

Rename layers

Description

Used to rename layers in a Field object.

Usage

renameLayers(x, old, new)

Arguments

x

The Field object whose layers should be renamed.

old

When new is provided, character names or numeric positions of column names to change. When new is not provided, the new column names, which must be the same length as the number of columns. See examples.

new

Optional. New column names, must be the same length as columns provided to old argument.

Syntax copied from data.table::setnames(), for which this function is essentially a wrapper.

Value

A Field (but not this is not strictly necessary since the Field object is changed in place)

Author(s)

Matthew Forrest matthew.forrest@senckenberg.de


MagicForrest/DGVMTools documentation built on Aug. 23, 2024, 8:05 a.m.