remove_dupcols: Remove columns with duplicate names

Description Usage Arguments Details Value See Also


remove_dupcols is an internal function to use inside of the dl_* functions. It checks for duplicate column names and drop them. It also checks for empty rows (all row NAs, TIMESTAMP included) and delete them.


remove_dupcols(data, parent_logger = "test")



Data frame in which check for duplicate column names


When exporting from excel files, sometimes cell fomatting makes empty columns and rows to be read and loaded in R. If that is the case, any try to transform and to shape the data faces a "duplicate column names error". This can be solved by the correct formatting of the excel files, but this can not be always achieved, hence this function. Also, when excel files with formatting are read sometimes empty rows are added. This function also check for that and fix it if happens.


remove_dupcols returns the loaded data with duplicate columns and wmpty rows removed, if any.

See Also

Other Data Loading Functions: dl_data_col_classes, dl_data, dl_dec_char_detect, dl_get_si_code, dl_metadata, dl_na_char_generator, qc_as_timestamp

sapfluxnet/sapfluxnetQC1 documentation built on May 29, 2019, 1:50 p.m.