remove_dupcols: Remove columns with duplicate names

Description Usage Arguments Details Value See Also

Description

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.

Usage

1
remove_dupcols(data, parent_logger = "test")

Arguments

data

Data frame in which check for duplicate column names

Details

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.

Value

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.