determine_NA_NC | R Documentation |
Classifies values as NA, NaN, or 999 depending on whether or not the measured values required for that calculation exist for none, some, or all of the parameters.
determine_NA_NC(df, col1, col2, include_between = F, col_name)
df |
dataframe containing measured values required for a specific calculation |
col1 |
first parameter required for the calculation |
col2 |
last parameter required for the calculation |
include_between |
boolean value, defaults to TRUE Do there exist columns between col1 and col2 that must be examined for the existence of valid numbers? If FALSE, no columns other than col1 and col2 must be examined. |
col_name |
string used to assign a name to the column that stores the
result of |
A dataframe identical to the input dataframe with one additional
column containing the result of determine_NA_NC()
and named using
col_name. Values are assigned as follows:
When all of the parameters required for the calculation are missing values, assign NA
When one or more (but not all) of the parameters required for the calculation are missing values, assign NaN
When all of the parameters required for the calculation are present values, assign 999 as a placeholder to indicate that a value should be calculated
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.