add_imputed_date: Add imputed date

View source: R/hathifiles.R

add_imputed_dateR Documentation

Add imputed date

Description

Adds an 'imputed' date of publication column based on the imprint column of the hathifile. This function checks for a year in the imprint column using a regex that identifies 4 numbers starting with 1 or 2 and extracts that as an imputed date, after checking that it's not greater than the current year.

Usage

add_imputed_date(hathi_file)

Arguments

hathi_file

The hathifile in memory, typically loaded by load_raw_hathifile (and perhaps filtered etc.). Must contain an "imprint" column.

Value

The hathifile with added ⁠imputed date⁠ column.


xmarquez/hathiTools documentation built on June 2, 2025, 5:12 a.m.