
Drop and merge replicated columns from the specified data frame.
Source:R/removeReplicatedColumns.R
removeReplicatedColumns.RdThis function drops and merges all the replicated columns from the specified data frame.
Value
The specified data frame with an additional deduplicated column and all the types transformed to string.
Details
All the occurrences of "N/A", "NA", and empty strings (case insensitive) inside the provided data frame are replaced with NAs of type character. Then, all and only the columns starting with the specified prefix are selected and united into a single column with name ending per "_deduplicated". All empty entries in the new deduplicated column are replaced with NAs. Finally, the new column is bound with the other columns of the initial dataframe.