Append Empty Columns
append_empty_col.RdAppends empty columns (value = NA) to a data.frame.
Arguments
- df
 A data.frame.
- col
 The name(s) of one or more columns desired in the final data.frame, as a character vector. Any names not currently in the data.frame will be added as empty columns; those present will remain unchanged.
- order
 Whether to reorder the data.frame to match the order of
col, as a boolean (default:FALSE). IfFALSEempty columns are added to the right. Whenorder = TRUE,colis used to specify column order. Thus, in addition to the names of the empty columns to append,colmust include all column names indf.append_empty_col()will not subset/select columns.