Replaces values in the mq.data member with (binary) values.

Share:

Description

Most MQ tables contain columns like 'contaminants' or 'reverse', whose values are either empty strings or "+", which is inconvenient and can be much better represented as TRUE/FALSE. The params valid_entries and replacements contain the matched pairs, which determine what is replaced with what.

Arguments

colname

Name of the column (e.g. "contaminants") in the mq.data table

valid_entries

Vector of values to be replaced (must contain all values expected in the column – fails otherwise)

replacements

Vector of values inserted with the same length as valid_entries.

Value

Returns TRUE if successful.

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.