Arguments
- data
A data frame of references to be cleaned, as produced by
find_ref_to_df()orparse_ref_to_df().
Details
This function tidies up the data frame of references obtained from find_ref_to_df() or parse_ref_to_df().
It performs various cleaning and reorganization tasks to present the data in a more structured and readable format.
The function performs the following steps:
Collapses non-essential columns (i.e. other than
dateandtitle), combining multiple entries into a single text string.Reorganizes
authorinformation, creating a full name from given, particle, and family components. Also add anauthor_ordercolumn. The column will remain in a list format.Separates and cleans dates and titles, organizing them into primary and additional information. The first date and first title are save in
dateandtitle. The other dates and titles are saved inother_dateandother_title.Extracts the year from the date and places it in a separate column.
Removes extraneous punctuation and trims whitespace from character columns.
Relocates key columns to a more standardized order for easier analysis and readability.
This function can be used directly, or indirectly through find_ref_to_df() or parse_ref_to_df()
by setting the clean_ref parameter to TRUE.
