hyAdd: [!] Add a variable to 'hyperSpec' object

View source: R/hyAdd.R

hyAddR Documentation

[!] Add a variable to hyperSpec object

Description

Add (or overwrite, if already exists) a variable which name is passed as var.name with values in unique.values that correspond to levels of factor variable by.

Usage

hyAdd(sp, var.name, by, unique.values)

Arguments

sp

hyperSpec object.

var.name

The name of variable to be added.

by

A factor variale which levels will correspond to values in unique.values.

unique.values

Unique values used to create the variavle.

Value

HyperSpec object with added/replaced variable. Lables of the variable indicate unique values used.

Author(s)

Vilmantas Gegzna

See Also

Other spHelper functions for spectroscopy and hyperSpec: IQR_outliers(), binning(), file, gapDer(), hy2mat(), hyAdd_Label_wl(), hyAdd_Labels_PAP_PD_2014(), hyAdd_Labels_TD2009(), hyDrop_NA(), hyGet_palette(), hyRm_palette(), mad_outliers(), mean_Nsd(), median_Nmad(), plot_hyPalette(), prepare_PAP_RK_2014__MATLAB_failui(), read.OOIBase32(), read.OceanView.header(), read.OceanView(), read.sp.csv2(), read3csv2hy(), replace_spc(), sd_outliers(), spStat(), sp_class_perform()


GegznaV/spHelper documentation built on April 16, 2023, 1:42 p.m.