ms_drop_var_prefix: Drop MacroSheds variable prefixes (DEPRECATED)

View source: R/ms_drop_var_prefix.R

ms_drop_var_prefixR Documentation

Drop MacroSheds variable prefixes (DEPRECATED)

Description

Remove the two-letter prefixes from MacroSheds variable codes. Retained for legacy use, but will be removed in a later version. See details.

Usage

ms_drop_var_prefix(x)

Arguments

x

character. MacroSheds variable code with a prefix.

Details

In version 1 of the MacroSheds dataset, variable codes all included a two-letter prefix to denote the sampling regimen. The first letter is either I for "installed" or G for "grab," denoting if this variable was recorded by a continuously monitoring piece of equipment, or manually by a human. The second position is either S for "sensor" or N for "non-sensor". Non-sensor samples are generally measured analytically, in a laboratory. In version 2 and later, this system has been simplified and replaced by a single, logical column called "grab_sample".

Value

Returns a vector of MacroSheds variable codes without their two character prefixes. If prefixes are missing, returns x with an warning.

Author(s)

Spencer Rhea

Mike Vlah, vlahm13@gmail.com

Wes Slaughter

See Also

ms_extract_var_prefix_()

Examples

macrosheds_vars <- c('GN_NO3_N', 'GN_Mg', 'IS_discharge')
macrosheds_vars <- drop_var_prefix(x = macrosheds_vars)

MacroSHEDS/macrosheds documentation built on Oct. 30, 2024, 11:15 a.m.