Adds a column (with the name specified in column_name) of NA values to a data.frame or tibble. If that column already exists, no change will be made to data. NA value type (character, integer, real, logical) may be specified.
add_col_if_absent(data, column_name, na_type = NA)
the data.frame as provided (converted to tibble)
a data.frame or tibble to which a column may be added
the name of the column to be added if it doesn't exist
the type of NA value to use for the column values. Default to basic NA