add_id_col()
adds an id column to either a data frame or to each data frame in a list.
listindex_to_col()
adds the listindex from the first list of a list of data frames
as an ID column in each of the nested data frames.
add_id_col(.data, value = 1L, var = "doc_id")
listindex_to_col(.data, var = "doc_id")