View source: R/ms_drop_var_prefix.R
ms_drop_var_prefix | R Documentation |
Remove the two-letter prefixes from MacroSheds variable codes. Retained for legacy use, but will be removed in a later version. See details.
ms_drop_var_prefix(x)
x |
character. MacroSheds variable code with a prefix. |
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".
Returns a vector of MacroSheds variable codes without their two character prefixes.
If prefixes are missing, returns x
with an warning.
Spencer Rhea
Mike Vlah, vlahm13@gmail.com
Wes Slaughter
ms_extract_var_prefix_()
macrosheds_vars <- c('GN_NO3_N', 'GN_Mg', 'IS_discharge')
macrosheds_vars <- drop_var_prefix(x = macrosheds_vars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.