Uses LibreOffice to convert a .pub file to plain text. This is required for CDC natality files from 1968-1972 which are distributed as Microsoft Publisher files. Conversion typically takes 10-20 minutes depending on file size and machine speed.

convert_pub(
  pub_path,
  outdir,
  soffice = "C:/Program Files/LibreOffice/program/soffice.exe"
)

Arguments

pub_path

Character. Full path to the .pub file to convert.

outdir

Character. Directory to write the converted .txt file to.

soffice

Character. Path to the LibreOffice executable. Defaults to the standard Windows installation path. Linux/Mac users will need to override this (e.g. "/usr/bin/soffice" on Linux or "/Applications/LibreOffice.app/Contents/MacOS/soffice" on Mac).

Value

Character. Full path to the converted .txt file.

Note

LibreOffice must be installed on your system to use this function. Download it at https://www.libreoffice.org/download/libreoffice-fresh/. To avoid the conversion step entirely, pre-converted versions of the 1968-1972 natality files are available as a GitHub release. See the package README for details.