MQDataReader-cash-substitute: Replaces values in the mq.data member with (binary) values.

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.


Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.