swap_in_zip: When passed a file that doesn't exist, check for the zip...

View source: R/Apply_Lookups.R

swap_in_zipR Documentation

When passed a file that doesn't exist, check for the zip version

Description

When passed a file that doesn't exist, check for the zip version

Usage

swap_in_zip(filename, path, directory = "")

Arguments

filename

The name of the data file

path

The location of the data file. Default ""

directory

The directory within the path that holds the lookup, default "Data\

Details

This function is meant for large data files. Our default approach is to zip them up, one zip per file, and name the zip file the same name as the data file, except with zip as an extension instead of .txt or .csv. This checks if the base file is available and if not it handles opening the zip file instead.

Value

The filename name, if the file exists. Otherwise the zip file that contains the file.

Examples

swap_in_zip(filename="Defense_Contract_SP_ContractSampleCriteriaDetailsCustomer.csv")


CSISdefense/csis360 documentation built on April 25, 2024, 12:01 a.m.