recent_file: Determine the most recently saved file

Description Usage Arguments Details Value

Description

With many similar filenames, find the most recently saved version

Usage

1
recent_file(directory, reg_ex)

Arguments

directory

the location of the files in question.

reg_ex

the regular expression to search for in the directory

Details

This function asks for a directory and a wildcard regular expression in order to search a directory for the most recently saved file. This is helpful if you want to keep historical versions of csv files or data files in the same place, but want to use the most recent in your calculations.

vdm.conn <- redhat_db_conn("~/Documents/R_code/", "output")

Value

recent_file returns a filename (including path) that can be then read into R


brascoball/hattyr documentation built on May 13, 2019, 2:30 a.m.