download_ndc_files_as_csv: Download and Convert NDC Files to CSV - To be used in the...

View source: R/convert_antibiotics.R

download_ndc_files_as_csvR Documentation

Download and Convert NDC Files to CSV - To be used in the Manual Build Process

Description

This function downloads a zip file containing NDC (National Drug Code) text files from a specified URL, extracts the files to a directory, converts them to CSV format, and optionally deletes the original text files.

Usage

download_ndc_files_as_csv(
  zip_file_url = "https://www.accessdata.fda.gov/cder/ndctext.zip",
  zip_file_name = "ndctext.zip",
  extract_dir = "inst/extdata/ndctext"
)

Arguments

zip_file_url

The URL of the zip file containing NDC text files to download.

zip_file_name

The name of the downloaded zip file.

extract_dir

The directory where the NDC text files will be extracted.


MIMER documentation built on June 22, 2024, 9:41 a.m.